IBM Sterling order management - Email Server - email

I'm trying to send the mail to the store (Node), on the onsucess event of createOrder api.
So for this, I've created 2 new services.
The first service receives the information from the onsucess event of the createOrder api and passes it on to the queue.
The second service receives the information from that queue and passes it on to the email server.
This sends the email. The problem is that for some of the orders the email is not sending, but we are not getting any exceptions for these.
In the logs for those orders it shows the "Successful Acknowledgement from the email server".
I don't know where the exact problem is. I have checked the email server, but cannot find anything related to the missing order information.
What steps can I take to further debug this problem?

You are saying, only some orders have this problem . Then it will be something related with the order details like the email id associated with it. And also if the successful message in logs shows message has been sent. But if it is a customized log please check it once again. If its Ok then please check the Email Server logs directly.

Related

SOA UMS Email Populating black list

I'm sending email notifications through SOA using UMS. However, email server has a limit on the amount of emails sent and some go to invalid emails.
I'm trying to find a way to retrieve notifications of message delivery failure in order to populate a black list. SOA human workflow notifications are sucessfully sent despite the email address, they only record status on gateway delivery. Email client is not registering sent notifications nor is it receiving delivery failure notifications. (Unless I send an email through the email client, not from SOA)
Basically, I would like to know if UMS stores information of delivery failure to recipient (not gateway) and if so how can I access it. In alternative, how can I setup email client to register sent notifications and receive failure reports that can somehow be passed to SOA so they can be analyzed and the email added to a black list.
Any info missing that can help solving this issue just ask and I'll append it to the post.
Best regards,
Martin
You can create an inbound UMS adapter polling the inbox to read all the incoming mails. UMS adapter has a filtering option to read only mails that matches the pattern. Set the pattern to read only delivery failure notifications. That way the polling service will get triggered only for messages with delivery failure.
Try this out and let me know if this solve your problem.
Regards,
Viv

Identify email message related to received webhook

Today I started to learn about webhooks and I was wondering if it is possible to know exactly what message is related to a received webhook.
For example, I have a website where customers can register and, after a successful registration, I'm sending them a confirmation via email. Is it possible to know that the customer clicked on that specific email message? (Considering that the customer can receive other types of email messages like password recovery, newsletters, etc). I know I can use the subject (something like if subject == 'Welcome to My Site' then do-email-post-registration-clicked-routine) but if the subject changes, or if they change it (when we reply to a message, usually the email client prepends "Re:" to the subject, I won't be able to track it.
Thanks in advance!
Yes. You can use custom arguments to track individual emails. Custom arguments get sent with event webhooks.
More documentation can be found here: https://sendgrid.com/docs/API_Reference/SMTP_API/unique_arguments.html

XMPP Framework: Not able to receive my messages

I am working on xmpp framework. I have done most of initial things. I created stream, Connected it and get authenticate. Now I am sending buddy request to another user from my app. App shows presence is sent. When I get roster it shows a entry there. But on other system I am not getting any precence or anything. I tried to send a message message is also not received by other client.
Than I used one id in ichat and send friend request to that id. Wow I am able to see friend request on ichat. I accept request from ichat :( No notification on my app.
If I send message to ichat. Message shown in iChat. but when I send message to my app from ichat.. My app is not getting any delegate called or nothing.
I don't know why this is happening.
I am using a non ARC xmpp framework.
Please guys Please help me. I am badly stucked in it :(
Thanks in Advance.
Have you consider to send presence after get authenticate?
If you are authenticate but not sending preence than server will consider you offline and all messages sent to you will be stored on server with delay.
Send your presence and see the magic. :)
I am not an iPhone developer so i can not explain programming.
In XMPP, Presence subscription has two handshakes. Like When first user send request to second user , it will ask for presence subscription to second user. When second user accept , then first user is subscribed for second user's presence. So he can get all the presence of second user. It's called "to" subscription type for first user. Now second user ask for presence subscription to first user and first accepts request then this "to" subscription type changed to "both" subscription type. Now both user can get presence of each other. otherwise only first user can get presence of second user.
And for messages, there must be a some prob with listener.

CRM plugin not firing for emails sent from console application

I have a plugin written that is registered for the DeliverIncoming message on the email entity in CRM. The plugin fires normally when emails arrive into a queue.
I also have a console application that connects to the CRM service, checks the followupby attribute of cases and depending on the date sends out a reminder/overdue notification.
The problem is that these emails aren't causing the plugin to fire. The email activities are created in CRM and the emails are sent and delivered without any issue but the plugin doesn't fire. I also tried registering the plugin against the Create message of the email entity and that doesn't fire either.
The emails are sent using the SendEmailFromTemplateRequest as the request object being passed into the CrmService.Execute() method
The plugin fires for all other instances of emails being delivered. The emails sent from the console application are the only ones experiencing this issue. Does anybody know why this would occur?
Thanks,
Neil
DeliverIncoming only fires for eMails routed into the CRM queues by the eMail Router. It will not fire on eMails you send from the CRM system.
Finding out what exact message a plugin needs to be registered against to fire on a certain action is sometimes a case of trial and error. Write a simple plugin that just logs the time and context.MessageName somewhere and register it against any message valid for the email entity. Then send an eMail through your application and have a look at what the plugin logged.
Turns out the plugin was firing, but when run from the console application it was throwing an exception when trying to log to a file it didn't have permission to. I had a break point on the second line, the first line was the logging line.

Sending emails in web applications

I'm looking for some opinions here, I'm building a web application which has the fairly standard functionality of:
Register for an account by filling out a form and submitting it.
Receive an email with a confirmation code link
Click the link to confirm the new account and log in
When you send emails from your web application, it's often (usually) the case that there will be some change to the persistence layer. For example:
A new user registers for an account on your site - the new user is created in the database and an email is sent to them with a confirmation link
A user assigns a bug or issue to someone else - the issue is updated and email notifications are sent.
How you send these emails can be critical to the success of your application. How you send them depends on how important it is that the intended recipient receives the email.
We'll look at the following four strategies in relation to the case where the mail server is down, using example 1.
TRANSACTIONAL & SYNCHRONOUS
The sending of the email fails and the user is shown an error message saying that their account could not be created. The application will appear to be slow and unresponsive as the application waits for the connection timeout. The account is not created in the database because the transaction is rolled back.
TRANSACTIONAL & ASYNCHRONOUS
The transactional definition here refers to sending the email to a JMS queue or saving it in a database table for another background process to pick up and send.
The user account is created in the database, the email is sent to a JMS queue for processing later. The transaction is successful and committed. The user is shown a message saying that their account was created and to check their email for a confirmation link. It's possible in this case that the email is never sent due to some other error, however the user is told that the email has been sent to them. There may be some delay in getting the email sent to the user if application support has to be called in to diagnose the email problem.
NON-TRANSACTIONAL & SYNCHRONOUS
The user is created in the database, but the application gets a timeout error when it tries to send the email with the confirmation link. The user is shown an error message saying that there was an error. The application is slow and unresponsive as it waits for the connection timeout
When the mail server comes back to life and the user tries to register again, they are told their account already exists but has not been confirmed and are given the option of having the email re-sent to them.
NON-TRANSACTIONAL & ASYNCHRONOUS
The only difference between this and transactional & asynchronous is that if there is an error sending the email to the JMS queue or saving it in the database, the user account is still created but the email is never sent until the user attempts to register again.
What I'd like to know is what have other people done here? Can you recommend any other solutions other than the 4 I've mentioned above? What's a reasonable way of approaching this problem? I don't want to over-engineer a system that's dealing with the (hopefully) rare situation where my mail server goes down!
The simplest thing to do is to code it synchronously, but are there any other pitfalls to this approach? I guess I'm wondering if there's a best practice, I couldn't find much out there by googling.
My 2 cents:
Once you have a user sign up, never roll back the registration if sending the E-Mail fails. For simple business reasons: They may not come back or re-register if it doesn't work out at the first try. Rather tolerate an incomplete registration and nag the user to confirm their E-Mail address as soon as possible.
In most cases when sending an E-Mail goes wrong, your app will not get immediate feedback anyway - non-existent E-Mail addresses on valid servers will send back a "undeliverable" message with some delay; if the mail gets eaten by a spam filter, you'll get no feedback at all; in other scenarios, it may take several minutes (greylisting) to several days (mail server temporarily down) for an E-Mail to get delivered. A synchronous approach waiting for the delivery of the mail is therefore doomed IMO. Even an immediate failure (because the user entered a obviously fake address) should never result in the registration getting rolled back.
What I would do is, make account creation as easy as possible, allow the user access to the account before it is confirmed, and then nag the hell out of them to confirm their E-Mail (if necessary, limit access to certain areas until confirmation). I would prevent the creation of a second account with the same E-Mail, though, to prevent clutter.
Make sure you allow changing the E-Mail address even if the previous address hasn't been confirmed yet, and enable the user to re-request the confirmation message to a different address.