Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Sending email using Gmail


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: May 27, 2017 10:48 AM Last Post By: Remy Lebeau (Te...
Janne Kekki

Posts: 7
Registered: 7/12/14
Sending email using Gmail  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 27, 2017 1:24 AM
Hello,

I'm new user and now I'm trying to send email using Gmail. How to send email using Gmail. Is there any good free example? I'm looking for some component which is free. It must use ssl-login nowadays.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Sending email using Gmail  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 27, 2017 10:48 AM   in response to: Janne Kekki in response to: Janne Kekki
Janne Kekki wrote:

I'm new user and now I'm trying to send email using Gmail. How to
send email using Gmail. Is there any good free example? I'm looking
for some component which is free. It must use ssl-login nowadays.

Indy ships pre-installed in Delphi, and its TIdSMTP component can be
used to send email through Gmail. Assign a
TIdSSLIOHandlerSocketOpenSSL component to the TIdSMTP.IOHandler
property, and then you can populate and send a TIdMessage component
with the TIdSMTP.Send() method.

However, do note that Indy does not yet implement OAuth authentication,
so in your Gmail settings, you need to either:

1) enable "Unsecure applications", and then use your main username and
password. Not preferred.

2) generate an application-specific password, and then use that instead
of your main password. This is the preferred solution.

There are plenty of examples floating around if you do a search.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02