Semd mail using gmail SMTP server - WeOnlyDo Discussion board

Semd mail using gmail SMTP server (wodSmtp)

by JohnW, Monday, June 01, 2009, 11:34 (5655 days ago)

Hi,

I am currently evaluating the wodSMTP Active X control.
I tried the example in Delphi exactly as it came and it worked for me.
I then ported it into my own program, and again it worked.

Line of code:

wodSMTP1.SendSimpleAttachment('xxxxx@gmail.com','yyyyy@asl-solutions.co.uk','Test message','This is just a test message','C:MCCDATA' + sRTFFileName);

But when I put in the various properties as specified in previous questions and answers, it failed. This is what came up in the Memo box:

Starting to send
Connecting to the server.
Connecting to: smtp.gmail.com

Negotiating SSL encryption.
Established SSL encryption.
Sending greeting to the server.
Connected to the server.
Connected
Sending MAIL FROM command.
Connected to the server.
Not connected.
DISCONNECTED
Done : 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 24sm7044766eyx.23
Disconnected, will retry.
Connecting to the server.
Connecting to: smtp.gmail.com
Negotiating SSL encryption.
Established SSL encryption.
Sending greeting to the server.
Connected to the server.
Connected
Sending MAIL FROM command.
Connected to the server.
Not connected.
DISCONNECTED
Done : 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 28sm7071280eye.26
Disconnected, will retry.

After that I copied the contents f the box and reset the prog.

Question is How can it work with minimal info but fail when correct info put in?

I use Outlook normally and have Gmail as my default. But the end-user does not use Outlook - only Gmail from within IE

Re: Semd mail using gmail SMTP server

by woddrazen, Monday, June 01, 2009, 11:41 (5655 days ago) @ JohnW

Hi John,


Can you please try something like this for sending email using Gmail SMTP server
[code]wodSmtp1.Security = SecurityImplicit
wodSmtp1.Authentication = AuthLogin
wodSmtp1.Login = someone@gmail.com
wodSmtp1.Password = somepass
wodSmtp1.Hostname = smtp.gmail.com
wodSmtp1.Port = 465

wodSmtp1.SendSimple someone@gmail.com , to@gmail.com , test , testing [/code]
Let us know how it goes.


Regards,
Drazen

Re: Semd mail using gmail SMTP server

by JohnW, Monday, June 01, 2009, 12:02 (5655 days ago) @ woddrazen

Hi John,


Can you please try something like this for sending email using Gmail SMTP server
[code]wodSmtp1.Security = SecurityImplicit
wodSmtp1.Authentication = AuthLogin
wodSmtp1.Login = someone@gmail.com
wodSmtp1.Password = somepass
wodSmtp1.Hostname = smtp.gmail.com
wodSmtp1.Port = 465

wodSmtp1.SendSimple someone@gmail.com , to@gmail.com , test , testing [/code]
Let us know how it goes.


Regards,
Drazen

Hi Drazen,

Before I was placing the properties directly into the wodsmtp1 component in Delphi's object inspector.
I then tried doing it via lines of code - and that worked! Thanks very much for your really prompt reply.

Regards,

John.[:smile:]

Re: Semd mail using gmail SMTP server

by Johnw, Monday, June 01, 2009, 20:57 (5655 days ago) @ JohnW

Hi John,


Can you please try something like this for sending email using Gmail SMTP server
[code]wodSmtp1.Security = SecurityImplicit
wodSmtp1.Authentication = AuthLogin
wodSmtp1.Login = someone@gmail.com
wodSmtp1.Password = somepass
wodSmtp1.Hostname = smtp.gmail.com
wodSmtp1.Port = 465

wodSmtp1.SendSimple someone@gmail.com , to@gmail.com , test , testing [/code]
Let us know how it goes.


Regards,
Drazen

Hi Drazen,

Before I was placing the properties directly into the wodsmtp1 component in Delphi's object inspector.
I then tried doing it via lines of code - and that worked! Thanks very much for your really prompt reply.

Regards,

John.[:smile:]

Hi again,

A little more testing and everything works so far, but if I send an email to a non-existent recipient, I get no error message. In my application, recipient addresses are supplied but I have no way to know in advance if they are all correct.
Is there a way of testing for a correct 'To Address'?

Thanks in anticipation,

John.

Re: Semd mail using gmail SMTP server

by wodDamir, Monday, June 01, 2009, 21:26 (5655 days ago) @ Johnw

Hi John,

I assume that the server didn't reply with an error, so we can't provide one.

Can you please provide us the Transcript property when you do such a send?

Regards,
Damba