send email to multiple receiver failed

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
7 posts • Page 1 of 1
User avatar
frankySie
Posts: 30
Joined: Mon Oct 15, 2012 12:01 pm

send email to multiple receiver failed

Post by frankySie »

In my WinCC OA 3.11 project the send of an email to single receiver is working fine.

But it fails if multiple recipients are provided. The return value is -1.
I tried to use ";" and "," as separator. But without success.
What could be the problem here?


The help file defines:
If you want to send an email to different recipients, you have to separate the addresses with ";" (for example, "receiver@etm.at;receiver2@etm.at;receiver3@etm.at").



Update: 1.2.2013: the SMTP server was tested, too. It works fine.

User avatar
frankySie
Posts: 30
Joined: Mon Oct 15, 2012 12:01 pm

Re: send email to multiple receiver failed

Post by frankySie »

I found the misstake. Whether it is my fault (sorry for that) or it is a problem in emSendMail().

In the recipients list one email-adr was not able to except emails. Then the call of emSendMail() return with error and no one is receiving an email.

But I expected, at least the valid email-addresses receive an email. This is not the case.

Question: is this correct that no emails will be send out if at least one email-address is faulty?

User avatar
fmulder
Posts: 330
Joined: Wed Feb 03, 2010 9:46 am

Re: send email to multiple receiver failed

Post by fmulder »

The beauty is that a lot of functions in PVSS are implemented in scripting language. This makes it possible for you to check the code.

When you look at the code then you'll find the following section. The list with names is 'strsplit' and a string "RCPT TO' is sent to the mail server. However, when the server doesn't know one of the mail adresses, then the server will return an error code and the function will close the socket (emSmtpClose()) and will terminate with a return code -1

So when one of your names is bad, then the whole function will terminate ! (the first, the last or any in the middle.. ! )

ds=strsplit(email[1], ";");
for (i=1;i

User avatar
frankySie
Posts: 30
Joined: Mon Oct 15, 2012 12:01 pm

Re: send email to multiple receiver failed

Post by frankySie »

This is understandable. In the view of a developer it defines such a behavior and as developer it can be accepted. But please think in the view of a customer.

In the view of a customer such a behavior needs to be discussed. Because a customer never will look to the implementation. Typically a customer reads the help and the documentation.

The general question still is open:

Is the WinCC OA processing at "send emails" with multiple recipients correct or not?

I think, two solutions could bring clearness:
1- the documentation (help) will be updated. The actual WinCC OA-processing with multiple recipients needs to be described as it is. Then a customer will know that faulty email addresses prevent email send-out. This solution only can be accepted if you (in the role of WinCC OA owner) agree to it. Agreement from the product management is required.

2- the implementation will be changed and WinCC OA is responsible to send emails , at least, to all correct email recipients.
In the view of a customer this is the most preferred solution.


The solution 2 is used to know because all email clients are following this processing. If many email addresses are provided as recipients then just the bad one's are coming back.

User avatar
fmulder
Posts: 330
Joined: Wed Feb 03, 2010 9:46 am

Re: send email to multiple receiver failed

Post by fmulder »

For your information. I'm not ETM ( I'm ex actually ). I'm just someone who sometimes checks this forum to see if there are any interesting discussions.

I was just trying to explain and not defend the issue that you encountered. I agree with your 2 options and believe that you need to make a formal report (through regular support channels). Both of your options seem valid and a combination would be best:

1) send the mail adresses that you can send
2) Return an error code that says : atleast one of your adresses was wrong but mail has been sent

Good luck

Frenk

User avatar
frankySie
Posts: 30
Joined: Mon Oct 15, 2012 12:01 pm

Re: send email to multiple receiver failed

Post by frankySie »

Ah ok. Your are right. Sorry, in my mind I supposed to be in contact with an employee of ETM. In the past this allways happend.
The official support will be contacted.
Thank's.

User avatar
frankySie
Posts: 30
Joined: Mon Oct 15, 2012 12:01 pm

Re: send email to multiple receiver failed

Post by frankySie »

Many thanks to the ETM support. The problem could be solved.

Well, the problem was the SMTP server used by me and/or the testenvironment. The SMTP server is located in an intranet (private test network).
The WinCC OA email-report works perfect with external internet addresses.
The problem occures if intranet addresses (internal, private ones) are used and, at least, one address is faulty.

Post Reply
7 posts • Page 1 of 1