Quantcast
Channel: Silk Performer
Viewing all articles
Browse latest Browse all 4084

Forum Post: RE: Is it possible to send mails with attachments by SMTP functions set?

$
0
0
There is a community article which provides good information on this: community.microfocus.com/.../15919.how-can-i-attach-a-powerpoint-file-to-an-email-when-testing-smtp.aspx The article links to another article showing how to do this with a text file.  As the file you are using is not just text, you will need to follow the information to encode the binary data.  It would be something like:    FOpen(hFile, "c:\\temp\\Image.jpg", OPT_FILE_ACCESS_READWRITE, OPT_FILE_OPEN);    FSizeGet(hFile, nSize);    write("file size = "); write(nSize); writeln;    write("File has been opened"); writeln;    FRead(hFile, sData, STRING_COMPLETE, nRead);        writeln("size of file:= "+string(nRead));    BinSetLen(sData, nSize);    writedata (bin(sdata)); You will then need to change the Content-Type within the WebSmtpSendData function in order to send an image file rather than text.

Viewing all articles
Browse latest Browse all 4084

Trending Articles