
Quote from smartmedia on January 31, 2023, 9:01 pmHi..
I am using the neoSmtp2GoSendHtml to send a mail. The mail is been sent but i don't have any call back in my subroutine. I use:
If [IsMailSuccessfullSend] == "True" AlertBox "Message" "Message is send" "" endifin subroutine to check the result. Any demo or help instructions ?
Hi..
I am using the neoSmtp2GoSendHtml to send a mail. The mail is been sent but i don't have any call back in my subroutine. I use:
If [IsMailSuccessfullSend] == "True" AlertBox "Message" "Message is send" "" endif
in subroutine to check the result. Any demo or help instructions ?

Quote from luishp on January 31, 2023, 10:53 pm@smartmedia I don't understand your question. You have two possible callback subroutines. The first one will execute on success and the second one on error.
In case of error you will get an error text message as a parameter.
@smartmedia I don't understand your question. You have two possible callback subroutines. The first one will execute on success and the second one on error.
In case of error you will get an error text message as a parameter.

Quote from smartmedia on February 1, 2023, 5:35 pmHi @luishp
The neoSmtp2GoSendHtml command is executed, the mail is been send but i don't receive response in success subroutine. This is my issue.
Hi @luishp
The neoSmtp2GoSendHtml command is executed, the mail is been send but i don't receive response in success subroutine. This is my issue.

Quote from luishp on February 3, 2023, 9:06 pm@smartmedia this is the complete JavaScript code used in neoSmtp2GoSendHTML:
function neoSmtp2GoSendHtml(theTo,theSender,theReplyTo,theSubject,htmlBody,successCallback,errorCallback){ var url = "https://api.smtp2go.com/v3/email/send"; if(theReplyTo==""){ theReplyTo = theSender; } $.ajax({ url: url, method: 'POST', headers: { 'Content-Type': 'application/json' }, data: JSON.stringify({ "api_key": $App["neoSmtp2GoKey"], "to": [theTo], "sender": theSender, "subject": theSubject, "html_body": htmlBody, "custom_headers": [ { "header": "Reply-To", "value": theReplyTo } ] }), }).done(function(result) { if(successCallback!=null){ successCallback(result); } }).fail(function(err) { if(errorCallback!=null){ errorCallback(err); } }); }I got it from Smtp2Go API samples for JavaScript and it should call successCallback function once the email has been sent.
Regards.
@smartmedia this is the complete JavaScript code used in neoSmtp2GoSendHTML:
function neoSmtp2GoSendHtml(theTo,theSender,theReplyTo,theSubject,htmlBody,successCallback,errorCallback){
var url = "https://api.smtp2go.com/v3/email/send";
if(theReplyTo==""){
theReplyTo = theSender;
}
$.ajax({
url: url,
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
data: JSON.stringify({
"api_key": $App["neoSmtp2GoKey"],
"to": [theTo],
"sender": theSender,
"subject": theSubject,
"html_body": htmlBody,
"custom_headers": [
{
"header": "Reply-To",
"value": theReplyTo
}
]
}),
}).done(function(result) {
if(successCallback!=null){
successCallback(result);
}
}).fail(function(err) {
if(errorCallback!=null){
errorCallback(err);
}
});
}
I got it from Smtp2Go API samples for JavaScript and it should call successCallback function once the email has been sent.
Regards.

Quote from smartmedia on February 18, 2023, 8:23 pmHi..
Just an update, finally i manged to got the response from the server of Smtp2Go.
So in neoSmtp2GoSendHtml command with an optional sub for success u must set a string parameter and then pass the contains into a new variable and check the data.succeeded to be 1 for success.
SetVar [IsMailSuccessfullSend] "[Parameters]" If [IsMailSuccessfullSend.data.succeeded] == 1 alertbox "Message" "Message send successfully" endif
Hi..
Just an update, finally i manged to got the response from the server of Smtp2Go.
So in neoSmtp2GoSendHtml command with an optional sub for success u must set a string parameter and then pass the contains into a new variable and check the data.succeeded to be 1 for success.
SetVar [IsMailSuccessfullSend] "[Parameters]" If [IsMailSuccessfullSend.data.succeeded] == 1 alertbox "Message" "Message send successfully" endif