can't handle SMTP function
karageur
Posts: 97
Hi Guys!
We are experiencing problems with sending emails via build-in functions of netlinx - smtp_send & smtp_server_config_set
getting this error: MailSenderPrivate::Send authentication error 4 (Unknown error code)
Tried many services: Gmail, Mail, Yahoo with all settings & ports 25,465,587 with TLS or without.
Even tried our own host email server. No luck!
Does anyone succeeded with mail sending by netlinx - please share the solution?
Regards
We are experiencing problems with sending emails via build-in functions of netlinx - smtp_send & smtp_server_config_set
getting this error: MailSenderPrivate::Send authentication error 4 (Unknown error code)
Tried many services: Gmail, Mail, Yahoo with all settings & ports 25,465,587 with TLS or without.
Even tried our own host email server. No luck!
Does anyone succeeded with mail sending by netlinx - please share the solution?
Regards
0
Comments
http://www.amxforums.com/showthread.php?9131-smtp-accounts&p=63243#post63243
I think I read a recent Master FW release note that said they addressed the smtp function so you might want to check it out and see.
Edit,
I decided to read the release for 4.1.373 and it does say but unfortunately that's the same FW I was running when I wrote the post in that link above so I fear you're SOL.
I'll try to get v.4.1.400 Hot Fix and see what it does
do you mean you've used the same build-in functions - smtp_send?
I know that standard port for unencrypted mail sending is 25. Are talking about it?
Could you please explain more detailed?
Thanks!
p.s. I have a corp email also with 25 port and without encryption (but with pass of course) - doesn't work with netlinx but works with The bat, outlook and etc.
DEFINE_DEVICE
dvMAIL_SERVICE = 0:5:0
DEFINE_VARIABLE
SINTEGER MAIL_IDX
CHAR username[30] = 'sendfrom@gmail.com'
CHAR password[25] = 'password'
CHAR fromuser[25] = 'AMX NI-3100'
CHAR sendto[] = 'sendto@gmail.com'
CHAR iTLS[] = 'SMTP_TLS_TRUE'
CHAR server[21] = 'smtp.gmail.com'
CHAR SMTPport[3] = '587'
DEFINE_START
SMTP_SERVER_CONFIG_SET(SMTP_ADDRESS,server)
SMTP_SERVER_CONFIG_SET(SMTP_PORT_NUMBER,SMTPport)
SMTP_SERVER_CONFIG_SET(SMTP_USERNAME, username)
SMTP_SERVER_CONFIG_SET(SMTP_PASSWORD, password)
SMTP_SERVER_CONFIG_SET(SMTP_FROM, fromuser)
SMTP_SERVER_CONFIG_SET(SMTP_REQUIRE_TLS, SMTP_TLS_TRUE)
WAIT 100
{
SMTP_SEND(dvMAIL_SERVICE, sendto, 'Test Send Mail','Sent From Define Start',Null_STR)
}
Confirmed. The above example works. I just setup a free gmail account and it worked, however it did not work on a paid yahoo account (aka yahoo plus) I am assuming it is related to the level or type of encryption the email server requires.
I am running the 4.1.400 hot fix
Gmail was the first tested mail provider.
And the first thing I checked the SMTP settings - here they are:
Outgoing Mail (SMTP) Server - requires TLS or SSL: smtp.gmail.com
Use Authentication: Yes
Port for TLS/STARTTLS: 587
So the same settings were used.
The main difference is that I didn't use intermediate variables, instead I just put the values directly in SMTP_SERVER_CONFIG_SET and SMTP_SEND functions.
Maybe this was the cause?
It does not come right out and say it, but if you look closely at the definition of the function for "SMTP_SERVER_CONFIG_SET" ... .. you will see that cfgValue[] is a CONSTANT. I remember missing this the first time around. However I do configure SMTP_Server from a structure at startup in most programs.
Another interesting note, when you use AMX Mail in Duet there is no TLS option. No one at AMX has been able to tell me why.
Hi,
It seems you need firmware hot fix v 4.2.393 on a Enova DGX16 system.
Also check that the SERVER port number is entered as CHAR and not INTEGER.
I tested this with a server that did not need authentication. Set the SMTP_USERNAME to an empty string ('') and don't set the SMTP_PASSWORD. TLS is set to FALSE.
Works also with attachments.
Regards,
Erik
I'm curious, has anyone used this to send to multiple recipients?
I have sent to multiple recipients and it works well. I seperated each recipients with a ; in my SMTP_Send string within the " " after the dev #