Sends the mail message using a standard mail header with the most important arguments: sender, recipient, subject.
WebAPI.bdh
WebSmtpDataEx( in hSmtp : number, in sTo : string, in sFrom : string, in sSubject : string, in sBody : string ): boolean;
true if the server responded with a positive return code
false otherwise
Parameter | Description |
---|---|
hSmtp | Handle to a Web connection that was created by WebSmtpConnect |
sTo | Recipient’s e-mail address. Sample: "Jim Jason<jim@mailprovider.com>" |
sFrom | Sender’s e-mail address |
sSubject | Subject of the e-mail |
sBody | The custom mail body |
dcltrans transaction TWebSmtp var hSmtp: number; begin WebSmtpConnect(hSmtp, "standardhost", WEB_PORT_SMTP); WebSmtpHello(hSmtp, "<MyDomain>"); WebSmtpMail(hSmtp, "<john@mail.com>"); WebSmtpRecipient(hSmtp, "<admin@mail.com>"); WebSmtpDataEx(hSmtp,"admin<admin@mail.com>", "SenderName", "ThisIsTheSubject", "This is a testmessage"); WebSmtpQuit(hSmtp); WebSmtpShutdown(hSmtp); end TWebSmtp;
eMail.sep