|
Class: EMailContentDescription
Object
|
+--EMailContentDescription
- Package:
- stx:goodies/communication
- Category:
- Net-Communication-EMail
- Version:
- rev:
1.18
date: 2021/04/09 17:58:05
- user: cg
- file: EMailContentDescription.st directory: goodies/communication
- module: stx stc-classLibrary: communication
SR:
this class represents the content of an email,
the content is everything which has nothing to do with the e.g. sender, receiver, smtp client
it is just the readable content like subject plainText html attachments
copyrightCOPYRIGHT (c) 2010 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
examples
-
examples
-
|eMailContentDescription smtp|
eMailContentDescription := self new.
eMailContentDescription subject:'sdfsdfsdf'.
eMailContentDescription subject:'Subject - ç¬å举·'.
eMailContentDescription plainText:'a plain text example: äöüßßß'.
eMailContentDescription html:'<div>an html text example: <b>äöüßßß</b></div>'.
eMailContentDescription
addAttachment:(Filename newTemporary contents:'content of text file'; yourself)
contentType:'text/plain'.
smtp := SMTPClient new.
smtp
connectTo:'exeptn'
port:nil
user:'info'
password:nil.
smtp
sendMessageString:eMailContentDescription content
withSubject:eMailContentDescription subject
contentType:eMailContentDescription contentType
to:'stefan@exept.de'.
smtp close.
instance creation
-
new
-
(comment from inherited method)
return an instance of myself without indexed variables
accessing
-
html: something
-
do not use empty string for nil here,
because this would send an html email withoit content instead of an text email
-
plainText: something
-
not supported
-
subject: something
-
not supported
adding
-
addAttachment: aFilename contentType: aContentType
-
constants
-
alternativeContentType
-
-
charset
-
-
htmlContentType
-
-
mixedContentType
-
-
plainTextContentType
-
initialization
-
initialize
-
(comment from inherited method)
just to ignore initialize to objects which do not need it
private
-
contentBoundaryEnd: aBoundary on: aStream
-
-
contentOrBlock: aTextOrBlock splitter: aSplitter on: aStream
-
-
contentSeparatorOn: aStream
-
-
contentSplitter: aSplitter on: aStream
-
-
contentType: aContentType charset: aCharset boundary: aBoundary encoding: anEncoding disposition: aDisposition name: aName baseName: aBaseName on: aStream
-
-
textOrBlockOrAttachmentDescription: aTextOrBlockOrAttachmentDescription type: aContentType charset: aCharset splitter: aSplitter boundary: aBoundary on: aStream
-
queries
-
content
-
-
contentType
-
-
subject
-
AttachmentDescription
|eMailContentDescription smtp|
eMailContentDescription := self new.
eMailContentDescription subject:'sdfsdfsdf'.
eMailContentDescription subject:'Subject - ç¬å举·'.
eMailContentDescription plainText:'a plain text example: äöüßßß'.
eMailContentDescription html:'<div>an html text example: <b>äöüßßß</b></div>'.
eMailContentDescription
addAttachment:(Filename newTemporary contents:'content of text file'; yourself)
contentType:'text/plain'.
smtp := SMTPClient new.
smtp
connectTo:'exeptn'
port:nil
user:'info'
password:nil.
smtp
sendMessageString:eMailContentDescription content
withSubject:eMailContentDescription subject
contentType:eMailContentDescription contentType
to:'stefan@exept.de'.
smtp close.
|