Hi everyone.
I am trying to use smtpmail.p to send mail with attachements .
I just can't point where I am doing wrong so that actually it won't send correctly the attachements.
I tried many random idea according to what is written in the smtpmail.p comments.
my actual code :
Any help would be appreciate .
I am trying to use smtpmail.p to send mail with attachements .
I just can't point where I am doing wrong so that actually it won't send correctly the attachements.
I tried many random idea according to what is written in the smtpmail.p comments.
Attachments CHAR - Comma separated list of attachment descriptions
Format looks like:
file[:type=<mimetype>][:charset=<charset>][:filetype=<filetype>]
Special Filetypes are: BINARY, B64ENCODED if you use
B64ENCODED make sure to call smtpmail with RemoveEncodedFiles
as the EmailTo parameter after sending all your emails
or the encoded files will build up in your temporary
directory.
LocalFiles CHAR - comma separated list of filenames to the files
described in Attachments. The filenames in this
parameter must either be in the Progress path or
have the entire path specified. In contrast to
filenames in the Attachments are the filenames to
show for the Attachments.
my actual code :
Code:
DEF VAR oSuccessful AS LOGICAL NO-UNDO.
DEF VAR vMessage AS CHARACTER NO-UNDO.
OS-DELETE VALUE("socketemail.log").
RUN mypath/smtpsender/smtpmail.p (
INPUT "smtpserver", /*mailhub*/
INPUT "[EMAIL="xxx@xxx.xxx"]xxx@xxx.xxx[/EMAIL]", /*emailto*/
INPUT "[COLOR=navy]yyy@yyy[/COLOR][U][COLOR=navy].yyy[/COLOR][/U]", /*emailfrom*/
INPUT "[EMAIL="zzz@zzz.zzz"]zzz@zzz.zzz[/EMAIL]", /*emailCC*/
INPUT "xi2newfr.pdf[:type=application/pdf][:filetype=BINARY]", /*attachements*/
INPUT "filepath/xi2newfr.pdf",/*localfiles*/
INPUT "Test d'envoie smtp", /*sujet*/
INPUT "Message de test pour un envoie smtp avec pièce jointe.", /*body*/
INPUT "[:type=multipart/related]" , /*mimeheader*/
INPUT "text", /*bodytpe*/
INPUT 2, /*importance*/
INPUT NO, /*authentification*/
INPUT "", /*authtype*/
INPUT "", /*utilisateur*/
INPUT "", /*motdepasse*/
OUTPUT oSuccessful, /*testreussite*/
OUTPUT vMessage /*infomessage*/
)NO-ERROR.
IF ERROR-STATUS:ERROR THEN MESSAGE ERROR-STATUS:GET-MESSAGE(1) VIEW-AS ALERT-BOX.
IF oSuccessful <> YES THEN
MESSAGE vMessage.
ELSE
MESSAGE "Le message a bien été envoyé." VIEW-AS ALERT-BOX .
Any help would be appreciate .