Sending Emails with 1756-EN2T/B

Drewster1123

Member
Join Date
Nov 2022
Location
Ontario
Posts
22
I've been trying to get this Ethernet module configured to send emails to our relay server but cannot get it to work.

the EN2T is running revision 2.005.

I'm able to shove my To, From and Server addresses as well as the subject into attributes on the EN2T through generic CIP instructions.

as of now I'm manually toggling the bits on to send this information. The messages are completing without errors until I get to the last MSG

The last message is a custom MSG with service code of 4b, class of 32f, instance of 1 and attribute of 0.

this errors every time with a "connection failure" error and an extended error code of 0100.

I cant find any information on what the service code is used for and i also cant find any information on the EN2T object itself.
 
Good sir,

I can tell you that class 0x32F may or may not be named 'PTMS'.

I can also tell you that it the name is the reverse of the above.

Upon this newfangled knowledge, we now may or may not know it has something to do with Simple Mail Transfer Protocol.

The arrangement of bits forming the hex abbreviation 0x4B is interesting in that it is common among lots and lots (and lots!) of Rockwell object service identifiers.

In oh so very many of those cases, it may or may not produce an instance list of the class that was interrogated.

However!

There is one documented* exception in how classes respond to this particular service request. It may or may not create a new instance of said class.

I would like to test this 0x32F class further and provide the help you have entrusted this forum to deliver.

* unofficially (per my documentation, the exception is the Socket class 0x342)
 
Last edited:
Ok ive made some progress since my last post. I used a tool called "smtp4dev" by rnwood to setup a fake email relay server that runs on my laptop and can receive emails. after i set the attribute 5 in the smtp class of "32f" to my laptops IP address, i was able to receive emails just fine. i used wireshark to see the actual smtp packets being sent between my fake server and the en2t card.

So now ive at least narrowed it down to the issue being with the mail relay server at our office.

the smtp4dev also has a relay tool to relay the message from the en2t card through my laptop and to the actual smtp server and the error im getting in the terminal is "The host name did not match the name given in the server's SSL certificate".

also in wireshark, the communication between the actual server and my PC relaying the email ends when the server responds with "2.0.0 Ready to start TLS" so I'm assuming that there is some security parameters that aren't being met. ill have to do a little more googling on that.

i never got the service code 0x4B to produce an instance list of the smtp class. not sure why. i did find more information on the ethernet object but it was still pretty confusing
 
You are probably well ahead of the game on this point but are you aware that port 25 is almost universally blocked by production Email servers. Email Relays are a bad thing so IT generally has to make specific machine to machine rules to allow it.
If you are using port 587 and authenticating then ... never mind. (and please post that code :geek: )
 
ive been working with the IT guy here and i was able to sent an smtp message using an tool to our relay server on port 25 but my IP needed to be set to a certain range that they had allowed. i checked with him that my EN2T module did also have an ip that was in the acceptable range and he said it was so that should be all good?

also what code are you wanting? PLC ladder?
 
OK, just didn't want you spinning wheels against an IT based blockade. Not everyone in OT has a good relationship with the IT dept. I love when my IT dept asks "what the heck are you doing now ?" Tells me they are doing their job.

Ladder would be fine. I've never tried to email from a PLC so it would be interesting to try. And to bug the IT staff.

What I really need to do is PING like sequence from a PLC to a non PLC (switch,PC etc) , but I'm not sure that's even possible.
 
The Link below is pretty much exactly what I ended up doing. i just had bits that i manually toggle to send the messages. however one thing i noticed is that it says to use <R><L> to separate the lines for the to address, from address, subject and body in the email tag, but i think using $R$L is the correct way to do it.

you can also go to the webserver of the 1756-en2t card and enter the diagnostics folder, and network settings. on this page you can actually see the "SMTP Server" attribute that you would have assigned with the "SetupMailServer" MSG instruction. you can mess around with this msg instruction to make sure that you are actually writing to this attribute.

Also that smtp4dev is an awesome tool. it looks like you can also relay the smtp from the en2t card through your pc to the actual smtp server address and use wireshark to see the communcations.

Chapter 6, Send Email.

https://literature.rockwellautomation.com/idc/groups/literature/documents/um/enet-um006_-en-p.pdf
 

Similar Topics

I've been having some trouble figuring out how to get the ip address for the mail relay server, is it something that I need to create separately...
Replies
10
Views
915
Hi Everyone, I'm using a small program to generate emails when certain conditions are met like when a counter exceeds a value. I was hoping that...
Replies
1
Views
2,001
So here's the deal. I'm fairly new to red lion HMI's, and this job, but have picked up the programming enough so far to build screens and make the...
Replies
4
Views
3,747
Hello everyone, I am trying to send an email with a Compact Logix L33ER. I used the example provided on the rockwell website, but it did not...
Replies
7
Views
2,986
Is it possible to send an email when a condition is met with rslogix 5000 only sing the 1756-ENBT/A. I was wondering because the rslogix...
Replies
4
Views
4,118
Back
Top Bottom