Email Notifications

For questions and postings not covered by the other forums
M45HY
Posts: 63
Joined: Wed Jul 11, 2012 7:32 am
Location: Mansfield, Nottinghamshire, UK

Email Notifications

Postby M45HY » Fri Apr 17, 2015 10:36 pm

Hello,

I have come across a problem where I have heard our clients say that they are not receiving some of our emails that are sent via our system.

We have a JADE programme that will send out an email to our Exchange Server, which will then send the email to Mimecast that will then forward the email on to the clients’ email address. However, some of the emails are successfully sent and some of them are not.

I was wondering whether there is a way that I can use JADE to confirm that the emails have been successfully passed to our Exchange Server? If this is done, then I can determine where the emails not being delievered are a JADE issue or a Networking issue.

Thanks,
Omash
"If you can't explain it simply, you don't understand it well enough." - Albert Einstein

murray
Posts: 144
Joined: Fri Aug 14, 2009 6:58 pm
Location: New Plymouth, New Zealand

Re: Email Notifications

Postby murray » Sat Apr 18, 2015 9:45 pm

Hi Omash,

Your question is far too non-specific to be able to give a specific answer. I can, however, give some very general guidance:

1. Find out how email actually works (e.g. the SMTP protocol, etc.).
2. Find out how your Jade application sends emails.

When you have understanding of these two concepts, then either of the two following outcomes are possible:

1. You will understand the solution to your problem (or else why there is no practical solution).
2. You will have some specific, detailed questions to ask to complete your understanding.

At a guess, based on your previous postings, are you possibly using the CnSMTP class in Jade's CardSchema to send the emails? If so, then the CardSchema documentation has a whole document on this class and how to send emails. It also includes instruction on how to obtain a status for sent emails. If I recall correctly, this inolves subscribing to a Jade Notification (which requires a userNotification event handler). The "send" is executed asynchronously, generating an event upon completion. I have seen a mistake by one of our programmers where no subscription was made to the Notification, so no event was ever notified for the successful or unsuccessful completion (the assumption being made was that emails were always sent). In this case the userNotification() event handler can check for the completion status code and take action accordingly.
Murray (N.Z.)

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Email Notifications

Postby BeeJay » Mon Apr 20, 2015 10:07 am

Mashy,

Further to Murray's response, if you are indeed using the CnSmtpConnection class in CardSchema to send your e-mails, then you'll want to refer to section 3.4 Checking That the Message Has Been Sent in the SMTPClass.doc file that comes as part of the JADECareStart download package.

Cheers,
BeeJay.

M45HY
Posts: 63
Joined: Wed Jul 11, 2012 7:32 am
Location: Mansfield, Nottinghamshire, UK

Re: Email Notifications

Postby M45HY » Tue May 12, 2015 11:18 pm

Hi Guys,

Sorry for the late reply.

We are using CnSmtpConnection at the minute and as BeeJay has suggested, I'm just going through the SMTPClass.doc file. I will also look in to our system on the actions it takes when sending an email as well as the protocols and get back to you if I find something suspicious or something that I'm not sure about.

Thanks,
Omash
"If you can't explain it simply, you don't understand it well enough." - Albert Einstein

murray
Posts: 144
Joined: Fri Aug 14, 2009 6:58 pm
Location: New Plymouth, New Zealand

Re: Email Notifications

Postby murray » Wed May 13, 2015 7:35 pm

Hi Guys,

Sorry for the late reply.

We are using CnSmtpConnection at the minute and as BeeJay has suggested, I'm just going through the SMTPClass.doc file. I will also look in to our system on the actions it takes when sending an email as well as the protocols and get back to you if I find something suspicious or something that I'm not sure about.

Thanks,
Omash
Hi Omash,
It sounds like you're on the right track. The documentation should give you most of what you need.
The key thing to get right (in my opinion) are the notifications: both subscribing and handling the events.
Also, the class has its own email-related exceptions that it can throw. You may want to handle these as well.
Murray (N.Z.)

mjagers
Posts: 17
Joined: Wed Sep 22, 2010 5:22 pm

Re: Email Notifications

Postby mjagers » Tue Aug 15, 2017 9:46 am

The CnSmtpConnection class will allow you to verify whether your email server accepted the email request or not. However that does not mean that the delivery is guaranteed, that is up to the email servers involved in the delivery.

So if an email is issued and your email server acknowledges that then it is possible for the email to eventually generate an error response from the target domain that will be unknown to the JADE Environment issuing the email.

As BeeJay has specified, the SMTPClass.doc provided in the JADECare Start release package provides detailed explanations and examples.

allistar
Posts: 156
Joined: Fri Aug 14, 2009 11:02 am
Location: Mount Maunganui, Tauranga

Re: Email Notifications

Postby allistar » Tue Aug 15, 2017 1:58 pm

One common reason for an email failing to be delivered is the SPF record on the mail server that "owns" the from address in the email. If you send an email with a from address of "someone@somewhere.com" from your own mail server you need to make sure that the SPF record of the somewhere.com DNS entry has the address of your mail server in it. Some recipient mail servers will check that your mail server is authorised to send an email "from" somewhere.com, and if you are not authorised then the mail will bounce back to your mail server.

Not all receiving mail servers make this check but we are finding that more and more are. Without correct SPF information it's common for emails to be bounced back. Jade won't have any idea that this has happened as it successfully sent the email to the first SMTP server. A well configured SMTP server will bounce the email back to either the postmaster or the from address depending on how it's been configured. A poorly configured email server will leave this bounced email in the "badmail" folder (for IIS SMTP at least).


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 9 guests

cron