Multiple Email Addresses in TO EMAIL field

Abhishek Chhajer

Well Known Member
HI EVeryone,

Is there SMTP setting that needs to be configured for below issue?

Function: Standard Email Merge Letter
Issue: Email not received when we have multiple email addresses in TO Email Address field.
Reason: If you have an invalid email address it seems JDE standard mail functions are not sending email to the valid one as well. This differs from the way Outlook works as it will send email to whosoever is valid on the list.

DEBUG LOG TRACE (Masking official IDs):

myEmailAddress: <*****************>
emailSubject: <Interface Errors>
contentType: <text/plain>
numAttachments: 1
recipients: <Valid Email Address; Invalid Email address>
cc: < >
bcc: <(null)>
toHeader: <Valid Email Address; Invalid Email address>
ccHeader: < >
May 27 04:48:10.270111 - 348/3904 WRK:Starting jdeCallObject (GENTEXT)addSentDateHeader : Date : <Wed May 27 08:48:10 2015
>
May 27 04:48:10.270112 - 348/3904 WRK:Starting jdeCallObject (GENTEXT)addSentDateHeader : Formatted Date : <Wed, 27 May 2015 08:48:10 +0000>
May 27 04:48:10.270113 - 348/3904 WRK:Starting jdeCallObject (GENTEXT)generateMIMEAttachments : processing regular attachement 1 of 1.
May 27 04:48:15.356000 - 348/3904 WRK:Starting jdeCallObject SMTP_ParseServerResponse : The SMTP server returned an error
Response from the SMTP server is <550 5.7.1 Unable to relay
>
May 27 04:48:15.356002 - 348/3904 WRK:Starting jdeCallObject (GENTEXT)Leaving sendMimeMsgOnSMTPImpl with return code value: <29>
May 27 04:48:15.356003 - 348/3904 WRK:Starting jdeCallObject Leaving sendMimeMsgOnSMTPImpl with an error return code : <29>
 
Never tried with multiple emails in the To Email field. To achieve the same, you can try this. Call System function/ BSFN to send email in a while loop for each To Email address. If all your To Email Addresses are in one string, then parse them into each.
 
That is my back-up plan. :)
Only issue with this approach I think is how to show all the addresses in TO? That is one reason why we put all in TO address.
 
Are you sure that is the issue?
That error "Response from the SMTP server is <550 5.7.1 Unable to relay" looks more like you are not authorised to send on the server.
Are you authorised to only internal emails perhaps (SMTP server does not allow this user to use it to relay mail to that domain) ?
 
I think we might be going off into the rough, here.

Assuming he's correct on the conditions he states he's seeing, it shouldn't have anything to do with separators and the like. Presumably (and hopefully he can confirm this through a test), he's able to send email messages to multiple valid email addresses just fine. It's only when one or more of those addresses is invalid that the email fails to send - not just to the invalid addresses, but to the valid addresses in the list as well.

Abhishek, can you please confirm that this is the case?
 
Hi David,
You are correct. One of the email address is incorrect. But what about the valid one?
I was expecting that the correct email address will be delivered and the incorrect one will fail. It works that way with outlook.
 
Also, I am receiving the error "Response from the SMTP server is <550 5.7.1 Unable to relay" when i am sending email to a distribution list.
 
The SMTP error is not coming from JDE, it is coming from your SMTP server. Try using an SMTP client to send emails to the same distribution list. You can write one fairly quickly in C#.
 
I think we might be going off into the rough, here.

Assuming he's correct on the conditions he states he's seeing, it shouldn't have anything to do with separators and the like. Presumably (and hopefully he can confirm this through a test), he's able to send email messages to multiple valid email addresses just fine. It's only when one or more of those addresses is invalid that the email fails to send - not just to the invalid addresses, but to the valid addresses in the list as well.

Abhishek, can you please confirm that this is the case?

Yups. Perfectly paraphrased. Any SMTP server setting that will help?
 
The SMTP error is not coming from JDE, it is coming from your SMTP server. Try using an SMTP client to send emails to the same distribution list. You can write one fairly quickly in C#.

SMTP server, agree. But how C# will help, If the SMTP server behaves the same way. I might be off here.
 
I've come across this for you.
Which is alluding the fact your SMTP server may be configured in a way it will not send an invalid email outside of your organisation.
It may however try and send a bad email inside.
So try that to prove it out.
Create your list which will send to everyone inside your domain and make one of them up so it fails. See if everyone else inside gets the email

https://live.paloaltonetworks.com/docs/DOC-7209

I do recall we have to configure our mail INI files correctly to authenticate the SMTP. I'll see if I can dig it out

Can you post up your ini file mail settings
 
Hi John,
Thanks!! Yes, that is the way i expected it to behave. But there has to be some setting somewhere, which validates all emails and if any of the email is not correct it will not send the email
Some rule in SMTP settings.
 

Attachments

  • test.jpg
    test.jpg
    18.1 KB · Views: 29
They look very close to mine :)

[JDEMAIL]
Rule1=90|OPT|MAILSERVER=mail.XXX.com
Rule2=100|DEFAULT|[email protected]
Rule3=110|DEFAULT|[email protected]
Rule4=120|DEFAULT|[email protected]
Rule5=130|OPT|MERGELOCAL=1
Rule6=140|OPT|UPDATELOCAL=0
Rule7=150|OPT|UPDATELOCAL=0
mailServer=mail.XXX.com
SMTPPort=25

I don see any issue there. It has to do something with SMTP transport rule. It must be like validate all email's or not.
 
When you say "invalid email address", do you mean one that doesn't exist or an address that is badly formatted (no @ for example)?
 
Hi Craig,
I was able to duplicate this issue with both the "Invalid scenario" you mentioned.
 
Perhaps it depends on the SMTP server implementation. If I send a list of addresses and one is not an existing address, there is no error. The SMTP server does not validate the existance of the address on the remote server, it relies on a bounce to the sender in that case. However, if I send a badly formatted address, the server does send an error and the local jde SMTP function fails. But, I think part of that is the JDE implemenation as the SMTP protocol requires the client to send each address separately with a RCPT verb. It appears that if any of those fail, the client function fails full stop. Kind of a guess though, I'd have to wire shark the TCP conversation to be sure.

This was done using the SMTP server on an iSeries V7R1

Craig
 
Back
Top