Welcome! Log In Create A New Profile

Advanced

Sending mail in webdev not working...pls help me

Posted by vicheka.pcs.crosspost 
vicheka.pcs.crosspost
Sending mail in webdev not working...pls help me
April 28, 2009 10:02AM
Dear everybody,
I try to use the build-in sending mail function as following:

EmailStartSMTPSession("ckdeveloper@gmail.com", "vicheka2009", "smtp.gmail.com",587,False)
IF ErrorOccurred THEN
Error(ErrorInfo(errSummary))
RETURN
END
//Reset the email variables
//EmailReset()
//Sender of the message
Email.Sender="ckdeveloper@gmail.com"
//Recipients of the message
Email.Recipient="vvicheka@yahoo.com"
Email.Cc = "ouk.chanvicheka@gmail.com"
Email.NbRecipient=1
//Attachments
Email.NbAttach=0

//Subject and content of message
Email.Subject="Test Subject"
Email.Message="Test Test Test"
Email.HTML=""
//Subject and content of message
EmailSendMessage("ouk.chanvicheka@gmail.com",EmailOptionRéférence)
IF ErrorOccurred THEN
Error(ErrorInfo(errSummary))
END
//Close the SMTP session
EmailCloseSession("SessionSMTP")

When I run it I have debug it for the session it can create if i use this port but I got the error "Mail send fail" and generate error "ckdeveloper@gmail.com" is not a valid session id. And if i did not specified the port (default = 25 i think) and it cannot even open the session when use default port it takes a long time then error appear "cannot creation session"

Message forwarded from pcsoft.us.windev
David Martin
Re: Sending mail in webdev not working...pls help me
April 28, 2009 01:15PM
Here are a couple of things I caught just by looking quickly.

Quote

EmailStartSMTPSession("ckdeveloper@gmail.com", "vicheka2009",
EmailSendMessage("ouk.chanvicheka@gmail.com",EmailOptionRéférence)
EmailCloseSession("SessionSMTP")

I believe these are your session id and need to match.

Quote

Email.NbRecipient=1
Email.NbCC=1

Email.Recipient="vvicheka@yahoo.com"
Email.Cc = "ouk.chanvicheka@gmail.com"

Not sure but think you need to tell it how many Recipients, CCs & BCCs you have before actually filling any in.

Also, you forgot to fill in the .NbCC

Here is an example ... warning typed in before any coffee was consumed ... winking smiley

gpr_sSMTPUser is string = "my.email@somedomain.com"
gpr_sSMTPPW is string = "letmein"
gpr_sSMTPServer is string = "mail.somedomain.com"

IF NOT EmailStartSMTPSession(gpr_sSMTPUser, gpr_sSMTPPW, gpr_sSMTPServer) = True THEN
	Error("Unable to connect", ErrorInfo(errMessage))
END
EmailReset()

Email.Sender = "valid.user@somedomain.com"

Email.NbRecipient=1
Email.Recipient[1] = "show-in-to-field@anotherdomain.com"

Email.NbCc=1
Email.CC[1] = "shown-in-cc-field@somedomain.com"
				
Email.NbBcc = 1
Email.Bcc[1] = "not-shown-anywhere@hideme.com"

Email.Subject = "This is the subject of an email."
Email.Message = "The body text is placed here and can be very long."

IF EmailSendMessage(gpr_sSMTPUser) = False THEN
	Error("The email was not sent")
END
Fabrice Harari.pcs.crosspost
Re: Sending mail in webdev not working...pls help me
April 28, 2009 01:41PM
Hi...

Unfortunately, gmail supports only secured transmission, and
emailstartsmtpsession DOESN'T (I have requested this option in version
10 or 11, without any success, so feel free to contact the support about
it)... the funny thing is that you can READ emails on a gmail mailbox,
but not send them... And it's still the same in version 14, in case youa
re wondering

I was told lately that the next LST would contain an example on how to
send email in those conditions, and I'm guessing it will not be by using
internal email methods

best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

More information on [www.fabriceharari.com]


vicheka wrote:
> Dear everybody,
> I try to use the build-in sending mail function as following:
>
> EmailStartSMTPSession("ckdeveloper@gmail.com", "vicheka2009", "smtp.gmail.com",587,False)
> IF ErrorOccurred THEN
> Error(ErrorInfo(errSummary))
> RETURN
> END
> //Reset the email variables
> //EmailReset()
> //Sender of the message
> Email.Sender="ckdeveloper@gmail.com"
> //Recipients of the message
> Email.Recipient="vvicheka@yahoo.com"
> Email.Cc = "ouk.chanvicheka@gmail.com"
> Email.NbRecipient=1
> //Attachments
> Email.NbAttach=0
>
> //Subject and content of message
> Email.Subject="Test Subject"
> Email.Message="Test Test Test"
> Email.HTML=""
> //Subject and content of message
> EmailSendMessage("ouk.chanvicheka@gmail.com",EmailOptionRéférence)
> IF ErrorOccurred THEN
> Error(ErrorInfo(errSummary))
> END
> //Close the SMTP session
> EmailCloseSession("SessionSMTP")
>
> When I run it I have debug it for the session it can create if i use this port but I got the error "Mail send fail" and generate error "ckdeveloper@gmail.com" is not a valid session id. And if i did not specified the port (default = 25 i think) and it cannot even open the session when use default port it takes a long time then error appear "cannot creation session"
>

Message forwarded from pcsoft.us.windev
benny depre.pcs.crosspost
Re: Sending mail in webdev not working...pls help me
April 30, 2009 09:13AM
hoi,

try use sending mail via outlook



Message forwarded from pcsoft.us.windev
Konrad Filser
Re: Re: Sending mail in webdev not working...pls help me
April 30, 2009 09:56AM
... we had the same Problem.
We solved it by deactivating the SMTP-Filter in the anti virus software (McAffee).

Konrad Filser
vicheka.pcs.crosspost
Re: Sending mail in webdev not working...pls help me
April 30, 2009 11:17AM
Thank you very much Fabrice and benny for giving good idea...
Your idea is good and for the sending mail to spam folder now my admin will solve this problem because I am not the admin of the server smiling smiley wish you both succeed with your work.... Happy International New.... bonne weekend to both of you...

Message forwarded from pcsoft.us.windev
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: