From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SMTP client sends one mail per addressee to every addressee

I use the Labview built-in SMTP client library to automatically send e-mails from my application. I just found out the weirdest issue: It seems to generate a separate e-mail for each addressee! I have experienced this with gmail. 

To illustrate: if I enter two addressees, I get two sent e-mails in the "sent" folder. When I send it to a gmail account, I receive it two times (even though it is only addressed to me once). When there are 3 addressees, there are 3 duplicates, etc!

double e-mail in sent.png

I have reproduced this issue with the normal VIs and with the expressVI. Also, I have found it in LV2015 as well as LV2016. 

2017-03-05 22_51_51-Configure Send Email [Send Email].png

 

Seems like a rather large issue to me.
Strangely enough, I don't see the duplicates appear in outlook.

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 1 of 11
(3,982 Views)

Hi aartjan,

 

Just to check, the users don't receive multiple copies, but they show up in your gmail sent items?

I am wondering whether this is a feature of gmail. The last paragraph of the following article suggests this:

https://www.msoutlook.info/question/prevent-duplicate-sent-items-gmail

 

(External link: NI are not responsible for the content of this web page.)

 

 

Looking at the headers of these emails might help confirm whether this is the case. 

 

Best regards,

 

Leah

0 Kudos
Message 2 of 11
(3,919 Views)

Good suggestion, but no sigar.

First, I am using the labview built-in SMTP toolkit. It should not expose such behaviour such as storing copies. 

Second: It is displaying as many copies as there are addressees! If sent to 4 recipients, there will be 4 copies in the sent folder. If one recipient is a gmail user, he/she will see 4 copies in the gmail inbox!

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 3 of 11
(3,905 Views)

Hmm, how strange. I have a few more questions and ideas:

 

  • Are you using the 'Send Email using SMTP Client' vi found under help>find examples? (Yours looks different to mine)
  • Have you tried using port 587 rather than 25? http://digital.ni.com/public.nsf/allkb/AFBA070636F76A488625787200612E0F
  • Have you tried separating recipients with ';' rather than ','?
  • What shows up in the 'set recipients' subVI? Are you using the CC field as well as 'to'?
  • Does this still happen when you send from a non-gmail account?
  • Do you have any email forwarding set up on your gmail accounts?

I'm afraid the inbuilt example has password-protected subVI's, which limits troubleshooting. 

Again, I would recommend looking at the headers of the multiple messages to see if they match.
https://support.google.com/mail/answer/22454?hl=en

 

Best regards,

 

Leah

0 Kudos
Message 4 of 11
(3,884 Views)

Unfortunately no solution. I use the built-in smtp library (LV 2015) as shown below. 

simple smtp e-mail.png

I attached it for who would like to try to reproduce.

 

I used the BCC field only, but behavior is the same either way

Haven't tried a non-gmail account. I am only using its SMTP functionality

No forwarding on this account. Seen on other accounts aswell

Same behavior on port 587

 

Anyone able to reproduce?

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 5 of 11
(3,872 Views)

You do understand that if you address an email to four email addresses it really has to send four separate emails to four different addresses, right?

 

I am not a Gmail user but maybe showing all four emails in your sent mail is just the way Gmail does it. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 11
(3,861 Views)

Obviously. Still, it is not normal behavior.

When I use the Outlook client to send the e-mail, I just get one message in my Sent folder. The way it should be. 

 

Am I the only one bothered by this?

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 7 of 11
(3,854 Views)

I'm still of the opinion that the sent items problem is a quirk of Gmail. 

 

Are you CCing to enough people that the multiple sent items are taking up too much space, or is it bothering you because of organisation? If there's no way around it, you might be able to set up a sent items rule in Gmail to sort it out.

 

As for receiving the emails more than once, that is more worrying to me. If I get a free moment when I'm next in the office I'll try and replicate.

 

Do let us know if you find a solution!

 

0 Kudos
Message 8 of 11
(3,850 Views)

I found proof this is an issue in the library.

I tried the same thing with the same library in the technology preview and ... no more duplicates!

 

Unfortunately that doesn't fix the issue in my application, which was reported to me by a customer Smiley Embarassed

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 9 of 11
(3,832 Views)

Ok, I had a play around with the library and these are my conclusions:

- Sent items do indeed show differently from emails sent natively from gmail
- This still occurs if I use an array of strings in the 'to:' terminal rather than using to&cc

(Saw something about 'copies' in the function reference that made me want to try this)
- However if you put gmail in 'conversation view' (was the default setting for me), doesn't really affect what you see as each email chain only shows as 1 item
- I coudln't replicate the multiple 'received items' problem: only received each email to each account once.

 

Most of this data is captured in the screencap below.

 

stmp.png

I wonder what setting is causing you to receive things multiple times... Happy to provide my VI but it is basically the example one. Other than that, I'm seeing what I would expect to see and don't think the sent items thing is unexpected for SMTP. Interesting that the technology preview version doesn't do it.Could you try writing your own version of the library using example VIs on this forum?

0 Kudos
Message 10 of 11
(3,818 Views)