Rank: Newbie
Groups: Registered
Joined: 10/6/2015(UTC) Posts: 1
I am generating a pdf file via an export from a database report and then attaching it to an email using
Quote: oSmtp := TMail.Create(Application); oSmtp.LicenseCode := EASEND_MAIL_KEY; oSmtp.FromAddr := 'xxx@xxx.co.uk'; ... other oSmtp parameters oSmtp.AddAttachment(Filename); oSmtp.SendMail;
Since I will be sending quite a lot of these very quickly I thought it would be faster to export the pdf to a Memory stream and attach that to the email instead of writing it to disc and reading it back.
I can make the pdf memory stream ok, but how do I attach it to the email using EASendMail ?
(Using Delphi 2009)
Rank: Newbie
Groups: Registered
Joined: 9/18/2020(UTC)
Posts: 0
Did you find out? Is it possible by using EASendMail? I need too.
Rank: Administration
Groups: Administrators
Joined: 11/11/2010(UTC) Posts: 1,153
Thanks: 9 times Was thanked: 55 time(s) in 55 post(s)
Rank: Newbie
Groups: Registered
Joined: 3/22/2021(UTC)
Posts: 0
Location: Köln
Has this been resolved? I am currently evaluating the use of EASendMail for your software products and need to be able to create Mail Attachments (e.g. PDF) from Memory Streams. I have looked at the resolved topic above which is suggested as solution. But I am using the .NET component and in this SmtpMail does not have a method AddAttachment1.
Rank: Newbie
Groups: Registered
Joined: 3/22/2021(UTC)
Posts: 0
Location: Köln
Ok, I figured out myself how to do it. I can use Mail.AddAttachment(FileName, MyStream.ToArray) I was confused because the documentation says that FileName must be "a full file name" which I understood as full path. But it works by just providing a file name to be shown in the mail.
Forum Jump
EmailArchitect Support
Email Component Development
- EASendMail SMTP Component - .NET Version
- EASendMail SMTP Component - Windows Store Apps
- EASendMail SMTP ActiveX Object
- EAGetMail POP3 & IMAP4 Component - .NET Version
- EAGetMail POP3 & IMAP4 ActiveX Object
Exchange Server and IIS SMTP Plugin
- DomanKeys/DKIM for Exchange Server and IIS SMTP
- Disclaimer and S/MIME for Exchange Server and IIS
EmailArchitect Email Server
- EmailArchitect Email Server (General)
- EmailArchitect Email Server Development
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.