Codesys send email

Levi G

Member
Join Date
Sep 2015
Location
Alberta
Posts
148
Hi all,
Has anyone successfully sent emails using the OSCAT_NETWORK.SMPT_CLIENT Function block?
It seems like the Function Block does not get past step10.
There seems to be a problem with the DNS server.

I went to whatsmydns.net and did an A search for the domain of the server I am trying to send from. I took that DNS address and used the OSCAT.IP4_DECODE to change it to a double word.

Where am I going wrong here?

I am testing this in Simulate, could this be a problem?

Thanks for taking the time to read and or respond.

smpt_client image.jpg
 
I am getting an error of 16711680 on the ERROR_C output of the SMTP_CLIENT Function block.
I think I may not have the DNS_IP4 correct. In the example in my first post I am trying to use the OSCAT_NETWORK.IP4_DECODE fb to convert the DNS ip address from a string value of XXX.XXX.XXX.XXX to a DWORD.
How can the DNS IP4 be a DWORD?

Should the DNS_IP4 be the IP address of the Mail Domain Server.?
 
How can the DNS IP4 be a DWORD?


Assuming an IP4 is a.b.c.d where a, b, c, and d are each a decimal value in the range 0 to 255, a.k.a. they are octets a.k.a. unsigned bytes, and a DWORD comprises four bytes, I would think the only problem would be byte order.

E.g. the IP4 8.8.8.8 would be DWORD 0x08080808 = 134744072 decimal.
 
Assuming an IP4 is a.b.c.d where a, b, c, and d are each a decimal value in the range 0 to 255, a.k.a. they are octets a.k.a. unsigned bytes, and a DWORD comprises four bytes, I would think the only problem would be byte order.

E.g. the IP4 8.8.8.8 would be DWORD 0x08080808 = 134744072 decimal.

This is what the IP4_DECODE Fb does with the DNS Ip address.
Thanks for the explanation.
 

Similar Topics

Hello, I am using a Hitachi Micro EHV+ for a small project, and I wanted to have a Web visu, done with Codesys V3.5 SP13 Patch 2. I test the...
Replies
6
Views
294
Hello, I have a requirement to manage the text alignment dynamically. So, for example: 1. English Texts should be displayed from Left in...
Replies
0
Views
90
Hello, I am new to Codesys, and am trying to learn about it for a project we're developing. I've got a couple questions, but first a little...
Replies
1
Views
146
Hi everyone, as this is my first experience with Rockwell Software i would like to know what's the best way to make Enumerations?
Replies
10
Views
503
I am trying to get Codesys to work with a couple of Moxa ioLogik E1200 series DIO devices (E1210 and E1211). I am able to write to the E1211 DOs...
Replies
2
Views
169
Back
Top Bottom