Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
6
Erster Beitrag:
vor 8 Jahren, 4 Monaten
Letzter Beitrag:
vor 8 Jahren, 4 Monaten
Beteiligte Autoren:
vicheka.pcs.crosspost, Konrad Filser, benny depre.pcs.crosspost, Fabrice Harari.pcs.crosspost, David Martin

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

Startbeitrag von vicheka.pcs.crosspost am 28.04.2009 08:02

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

Antworten:

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 ... ;)


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


von David Martin - am 28.04.2009 11:15

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

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 http://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

von Fabrice Harari.pcs.crosspost - am 28.04.2009 11:41
hoi,

try use sending mail via outlook



Message forwarded from pcsoft.us.windev

von benny depre.pcs.crosspost - am 30.04.2009 07:13

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

... we had the same Problem.
We solved it by deactivating the SMTP-Filter in the anti virus software (McAffee).

Konrad Filser

von Konrad Filser - am 30.04.2009 07:56
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 :) wish you both succeed with your work.... Happy International New.... bonne weekend to both of you...

Message forwarded from pcsoft.us.windev

von vicheka.pcs.crosspost - am 30.04.2009 09:17
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.