Welcome! Log In Create A New Profile

Advanced

Send E-mail problem

Posted by emirhan 
emirhan
Send E-mail problem
February 26, 2009 04:55PM
Hi all,

I try to use send email functions of the windev 10 but there is an error
"Last SMTP Server Response: 501 Syntactically invalid HELO argument(s)"

What does the error mean?

the error occurs on the code :
EmailStartSMTPSession(Username,SmtpAddr)
Piet van Zanten
Re: Send E-mail problem
February 26, 2009 04:59PM
Hi,

You should check the type of the parameters you pass and their values at runtime by setting a breakpoint on the line of code where the error occurs.

Regards,
Piet
emirhan
Re: Send E-mail problem
February 26, 2009 06:03PM

I control the parameters and their values by using break point but there is no any mistake about parameters. I think it can be about smtp protocol error bu I don't konw how can I solve that.
Marc De Swert
Re: Send E-mail problem
February 27, 2009 11:28AM
Mayby helpfull what i found on the net:

[www.networkdictionary.com]

section 4.2.2 Reply Codes ...

and section 2.2.1 Background for HELO and EHLO

mayby helpfull

we also use Windev10 with sending emails like this
PROCEDURE gp_Zend_mail(p_NaarWie, p_Onderwerp, p_Bericht, p_Opmerking=False, p_Screendump=False, p_Attach= "", p_From="", p_InCC="")
LOCAL
lv_EmailAgent is string
lv_EmailUser is string
gv_SMTPServer is string = "ACLZPSMX"

//SMTP Session Opening
EmailStartSMTPSession("SessionSMTP", gv_SMTPServer)
IF ErrorOccurred THEN
Error( StringBuild(ErreurInfo + CR + CR + "Er is een fout opgetreden bij het verzenden van de mails naar (SessionSMTP) server: "+ gv_SMTPServer +...
+ CR+CR+"Gelieve contact op te nemen met de ServiceDesk met de melding dat Fleems (Module Bewegingen) geen mails meer kan versturen ."))
RETURN
END

//Reset Email variables
EmailReset()

lv_EmailAgent = SQLCol("get_email",1) //found thru a sqlsatement
lv_EmailUser = SQLCol("get_email",1)

Email.Recipient[1] = p_NaarWie
Email.Recipient[2] = gv_MAILOperations
Email.NbRecipient = 2
Email.Subject = p_Onderwerp
IF lv_EmailUser <> "" THEN
Email.Cc[1] = lv_Emailuser
Email.Cc = p_InCC
END
Email.NbCc = 1


//Message Sender
Email.Sender = lv_EmailAgent

//Attachments
IF p_Attach <> "" THEN
Email.NbAttach = 1
Email.Attach[1] = p_Attach
END

//Message Body
Email.Message = p_Bericht

//Extra opmerking aan het bericht toevoegen
IF p_Opmerking THEN Email.Message = Open(Ingave_EmailOpmerking, Email.Message)

Email.HTML = ""
EmailSendMessage("SessionSMTP")

IF ErrorOccurred THEN Error(ErrorInfo(errSummary))

//SMTP Session Logout
EmailCloseSession("SessionSMTP")


marc :cool:
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: