Direct setting of common email sending servers
Idsmtp1.host: = SMTP Service
Idsmtp1.port: = port; default value: 25
Idsmtp1.authenticationtype: = atlogin; // ensure that the logon mode is login.
Idsmtp1.username: = User Name
Idsmtp1.password: = Password
Last idsmtp. Connect (),
Idsmtp1.authenticate
Idsmtp1.send (idmessage1)
But it is not very good for Gmail,
Because Gmail mailbox requires SSL encryption, you need to add the Indy control tidssliohandlersocket
Set tidssliohandlersocket. ssloptions. Method: = sslvsslv3
Then
Idsmtp1.iohandler: = idssliohandlersocket1 // The difference is here
Idsmtp1.host: = SMTP Service
Idsmtp1.port: = port; default value: 25 -- Gmail SMTP port 465
Idsmtp1.authenticationtype: = atlogin; // ensure that the logon mode is login.
Idsmtp1.username: = User Name
Idsmtp1.password: = Password
Last idsmtp. Connect (),
Idsmtp1.authenticate
Idsmtp1.send (idmessage1)
The small difference is that I am always busy, ah, 2010-12 records, it cannot be guaranteed that Gmail will not change in the future.
Pop should be roughly the same, because it will not be pasted if it is not done.