You are not logged in.
Pages: 1
Hi,
have had some trouble sending Mail with Indy TIdSmtp component and came across your TSMTPServer and related classes in dddInfraEmailer.pas.
Figured I can use them stand alone this kind:
var
smtp : TSMTPServer;
smtpconnection : ISMTPServerConnection;
rcpt : TRawUTF8DynArray;
begin
SetLength(rcpt,1);
rcpt[0] := 'mail@abc.xyz';
smtp := TSMTPServer.Create(TSMTPServerSocketConnection,'mailserver.local',25,'','');
try
smtpconnection := TSMTPServerSocketConnection.Create(smtp);
smtpconnection.SendEmail(rcpt,'sender@xxx.zzz','Mailsubject','','Bodycontent');
smtpconnection := nil;
finally
smtp.Free;
end;
end;
A mail is actually sent with that code. My question is: Without setting up a Rest Server with DDD Mail daemon etc, is the code above the way to go for just sending a simple mail ?
Thanks
Martin
Offline
Hi,
Is there a way to send attachments ?
Offline
I've found that synapse works well:
http://synapse.ararat.cz/doku.php/
It supports attachments and SSL connections
Offline
Pages: 1