Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 5 Jahren
Letzter Beitrag:
vor 5 Jahren
Beteiligte Autoren:
Jim Carson, Paulo Oliveira, Eric W, Jose Antonio Garrido, stefan.kern

SMTP testing WD

Startbeitrag von Jim Carson am 31.07.2013 18:57

I am having a problem sending emails through my providers Smtp server. I am able to start a session and compose the email. It works great as long as the recipient is my email with the same server, but if I try to send to an outside address, it processes but does not get delivered. And I get no errors.

Is it possible to trace the "Servers" responses during this operation? I think it is some kind of an authentication problem, yet I am sending user and password and the session gets started and ends without error.

Thanks for any ideas


My code=

IF EmailStartSMTPSession("carson" , "xxxxxx" , "smtp.xxxxxxx.com", 26)

IF ErrorOccurred THEN
Error("Unable to establish the connection", ErrorInfo(errSummary))

Email.NbRecipient = 1

Email.Recipient = "jccre8n@xxxxxx.com" //for test

Email.Sender = "Jim C" //SMTPSettings.UserName
Email.Message = "Auto SMS Test. Please call the office to confirm receipt"
Email.Subject = "test OWL SMS Messaging"
// Sends the email
IF EmailSendMessage(UserName) = False THEN
// Close the session




why are you using port 26?
It should be 25 or 587



von stefan.kern - am 31.07.2013 19:50
Hi. This code works for me in WD17 and WD18:

mysession is EmailSMTPSession
mysession.ServerAddress = "smtp.gmail.com"
mysession.Name = "jose@gmail.com"
mysession.Password = "xxxxxx"
mysession.Port = 587
mysession.Option = emailOptionSecuredTLS

myemail.Sender ="jose" //this is necessary
myemail.SenderAddress ="jose@gmail.com" //this is necessary

José Antonio

von Jose Antonio Garrido - am 31.07.2013 20:04

Since we don't know what type of account you have with your ISP I'm assumming that you have a personnal dynamic account similar to a home / personal one.

The fact that you have success when looping back to you (sending to local address) would indicate that the smtp server thinks your trying to relay through them with a non-local sending address resluting in an annonymous relay.

So check the sending address your claiming to be and make sure that the smtp sever knows that domain to be local to it. (the email address)

Check this then let us know if you still have a problem

von Eric W - am 01.08.2013 13:01
Thanks all for your responses.
I am able to initiate the session, prep the email and send. I have checked the sender name. I do not get any errors. Still I will receive to my local email account, but not to any others.

Is there a way to trace the SMTP server responses so that I could compare the successful delivery (relay) to the ones that are not successful?

Update: Just tried the Gmail Smtp server and it works great. So, I guess there is an issue with my ISP.

Thanks again

von Jim Carson - am 01.08.2013 16:31
So now a new issue. I want to add an attachment to my gmail generated message. The code I am trying to use is :

////Email.Attach =
myAttach is EmailAttach
//////// Build the EmailAttach variable
myAttach..Name = "Map.JPG"
myAttach..Content = "C:\Documents\map.jpg"
//myAttach..ContentType = "jpeg"
myAttach..ContentDescription = "A jpeg map"
////// Add the attachment
Email.Attach = myAttach

The email goes through but there is nothing attached. ???

von Jim Carson - am 02.08.2013 01:21
The Email.Attach is one array, check EmailAttach in the help.
Try to set the Email.NbAttach variable to the number of attach files or add the attach to the array.


von Paulo Oliveira - am 02.08.2013 08:16
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.