PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → trying to send a Email trough EmailStartSMTPSession
trying to send a Email trough EmailStartSMTPSession
Started by Sven, Jul., 01 2005 1:01 AM - 2 replies
Posted on July, 01 2005 - 1:01 AM
Hi Guy's,
What am I doing wrong here ?
The script dossent return errors, but I don't recieve any mail.
I've cheked the syntax over and over, and I can't find it's problem.
If anyone has an idea, i'll be very thankful :-)
ProgressBar1..MinValue = 0
ProgressBar1..MaxValue = Window1.Aantal_E_Mails
SessionName is string
serversmtp is string = "mail-out.pandora.be"
Counter is int = 0
ProgressBar1 = 0
FOR Counter = 0 TO Window1.Aantal_E_Mails
SessionName = Counter + "Name"
IF NOT EmailStartSMTPSession(SessionName,serversmtp) = True THEN
Error("Geen geldige SMTP server")
Close(Window2)
END
Email.Recipient= "ambiorex@innet.be"
Email.Sender = "Toto@Society.uk"
Email.Message = "Test Auto eMail"
Email.NbRecipient = 1
EmailSendMessage(SessionName)
EmailCloseSession(SessionName)
ProgressBar1 = ProgressBar1 + 1
END
Posted on July, 01 2005 - 10:37 AM
Hi,

First, add a test result on the 'emailsendmessage' instruction like this :

IF NOT EmailSendMessage(SessionName) THEN
Error(EmailMsgError(Email.Error))
END

Maybe you will have more info about the 'not sending' error

(you session name begin with a number...maybe it's not accepted too ?)

Regards...

Fred
Posted on July, 04 2005 - 2:24 PM
Sven,
the first parameter of EmailStartSMTPSession is User Name.
It must be the user name that you have in your usual email client that allows access to the SMTP server.
Regards,
Andy
Hi Guy's,
What am I doing wrong here ?
The script dossent return errors, but I don't recieve any mail.
I've cheked the syntax over and over, and I can't find it's problem.
If anyone has an idea, i'll be very thankful :-)
ProgressBar1..MinValue = 0
ProgressBar1..MaxValue = Window1.Aantal_E_Mails
SessionName is string
serversmtp is string = "mail-out.pandora.be"
Counter is int = 0
ProgressBar1 = 0
FOR Counter = 0 TO Window1.Aantal_E_Mails
SessionName = Counter + "Name"
IF NOT EmailStartSMTPSession(SessionName,serversmtp) = True THEN
Error("Geen geldige SMTP server")
Close(Window2)
END
Email.Recipient= "ambiorex@innet.be"
Email.Sender = "Toto@Society.uk"
Email.Message = "Test Auto eMail"
Email.NbRecipient = 1
EmailSendMessage(SessionName)
EmailCloseSession(SessionName)
ProgressBar1 = ProgressBar1 + 1
END