FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
Sending Email SMTP - Strange Results
Sending Email SMTP - Strange Results
Débuté par Mister VINCENT, 06 jan. 2017 01:05 - 1 réponse
Connectez-vous…
Mister VINCENT
#1
Membre enregistré
19 messages
Posté le 06 janvier 2017 - 01:05
I am sending eMail from an application. The code works and eMail is sent from the application and received quickly on the other end. But the code is indicating that the eMail was not sent, even though it is arriving. The sender also is not correct, indicating that it is being sent by the gSessionSMTP..Name instead of the sUser. The code follows and, if anyone has the time, perhaps you might take a look at it. I've followed the debugger and everything appears to be good.
sUser is string = EDT_Email // value input on the screen
sRecipient is string = "sassy@gmail.com"
sSubject is string = "Request For Help"
sMessage is string = EDT_Message
sBCC is string = ""
// Session SMTP
gSessionSMTP is EmailSessionSMTP
gSessionSMTP.ServerAddress = "smtp.gmail.com"
gSessionSMTP..Name = "sassybiz@gmail.com"
gSessionSMTP..Password = "Judge014"
gSessionSMTP..Port = 587
gSessionSMTP..Option = emailOptionSecuredTLS
// Content of the eMail
MyMessage is Email
MyMessage..Sender = sUser
MyMessage..Recipient[1] = sRecipient
MyMessage..Subject = sSubject
MyMessage..Message = sMessage
MyMessage..HTML = MyMessage..Message
// Send the eMail
IF EmailStartSession(gSessionSMTP) = True THEN
IF EmailSendMessage(gSessionSMTP, MyMessage) = True THEN
ELSE
Error("The error is : ", ErrorInfo(errFullDetails)) // fails here but sends the eMail
END
ELSE
Error("Unable to establish a connection", ErrorInfo(errMessage))
Info(ErrorInfo(errMessage))
END
EmailCloseSession(gSessionSMTP)
Reset()
Thanks
Vincent C
--
Vincent D Crosby
Signaler
0
0
Mister VINCENT
#2
Membre enregistré
19 messages
Posté le 06 janvier 2017 - 01:51
I think I've answered my own dilema. I am trying to do something that can't be done, make it look like the eMail is coming from the requestor. Since my account is making all this possible, then it has to be my account that is doing the sending. I understand that NOW.
But, running the code under WEBDEV 17, I appear to have an error in the sending but the message goes anyway. Running the code under WINDEV 21, there is no error.
Can't figure out why?????
--
Vincent D Crosby
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte