PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → trying to send a Email trough EmailStartSMTPSession
trying to send a Email trough EmailStartSMTPSession
Iniciado por Sven, 01,jul. 2005 01:01 - 2 respuestas
Publicado el 01,julio 2005 - 01:01
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
Publicado el 01,julio 2005 - 10:37
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
Publicado el 04,julio 2005 - 14:24
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