[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SMTP Alternative Content + PDF Attachment


Le 08/05/2024 à 13:17, Weg a écrit :
Hello

How can I use alternative content with smtp Class and also sending
Attachments like PDF-Files

I can Add Attachments by:

smtp.Body = "Hello World"
smtp.add("<h1>Hello World</h1>, "text/html" )
smtp.add(File.Load("PDF.pdf"), "application/pdf", "PDF.pdf")

One of them is alternative mail content and the other is not.
But I can only define

smtp.Alternative = true / false

global in the class valid for all attachments.

How is it possible to handle this?

Thanks
Tom


Sorry, I didn't think doing such thing would be useful.

You have to rewrite the SmtpClient code to do that, mainly the part that builds the mail before sending it.

SmtpClient is entirely written in Gambas, so it should be possible.

Regards,

--
Benoît Minisini.


References:
SMTP Alternative Content + PDF AttachmentWeg <way@xxxxxx>