I would like to ask how to implement the automatic mail function in Delphi7.

Source: Internet
Author: User
I would like to ask how to implement the automatic mail function in Delphi7 Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiNetwork/html/delphi_20061212105758143.html
I would like to ask how to implement the following functions in Delphi7:
The message sent by MessageBox is automatically sent to a recipient by email! TKs !!!

Idsmtp1.authenticationtype: = atnone;

Idsmtp1.connect;

Try if

Idsmtp1.authschemessupported. indexof ('login')>-1 then

Begin

Idsmtp1.authenticationtype: = atlogin;

Idsmtp1.authenticate;

End;

Idsmtp1.send (idmessage1 );

Finally

Idsmtp1.disconnect;

End;

Top.

Procedure tform1.sendemail (eaddress: string; scontent: string); // send mail
Begin
Try
Idsmtp1.host: = '192. 168.30.13 '; // SMTP server ksmail03 '192. 168.30.13'
Idsmtp1.port: = 25; // SMTP Port
Idsmtp1.username: = '';
Idsmtp1.password: = '';
Idsmtp1.connect ();
Except
Exit;
End;
Try
Idmessage1.body. Clear;
Idmessage1.body. Add (scontent); // content
Idmessage1.from. Text: = 'webapps @ codecomnic.com.cn '; // from
Idmessage1.recipients. emailaddresses: = trim (eaddress );
Idmessage1.subject: = 'do not swipe the card to remember the demo'; // Title
Idsmtp1.send (idmessage1 );
Finally
Idsmtp1.disconnect;
End;
End;

Idsmtp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.