Senting bulk mails to recipient individually using Java Mail API - java

I need to send dozens or hundreds of people the same message without having to display everyone's e-mail addresses.
Also I need tracking of respective action made to the each mail which i have sent (i.e., received status, open status, etc)
Say i am sending message 1000 recipients in a fashion of 50 reciepient at one time.
While i am sending the email in BCC mode, i can achieve that the same message sent to dozen of people without having to display everyone's e-mail addresses. But here i didn't able to track the respective action made to the each mail which i have sent.
while i amd sending the email in Normal mode, I can achive the both but it takes to long time to process all the 1000 recepients.
Is there is any better way to accomplish the both items which i need?
if so can you share with us to over come the problem.

I answered your question on the OTN Forum. Here's my response:
The only better way is to contract with a bulk mail service that will do all this for you.
Whether you can do better may depend on what exactly you mean by "track the respective action made to the each mail". If you want to know whether each recipient received the message or replied to the message, you need to send a different message to each recipient with some personally identifiable information. If you only want to know whether the message was delivered to each recipient successfully, and you're willing to depend on Delivery Status Notifications (which not all mail servers support), you can determine from the returned Delivery Status Notification whether delivery was successful or not for each recipient. But again, some servers won't return DSNs at all, and some won't return them in the standard format.
Also, I assume you've already tried using just a single connection to send a different copy of the message to each recipient, as described in the other answer. If you haven't tried that, start there. :-)

Have a look here: how-to-send-multiple-emails-in-one-session
If today you're using one Session and static Transport.send() per Mail, this could speed things up a lot.

Related

Nexmo inbound sms

i have a question about Nexmo SMS and about nexmo java client.
I have one virtual number, and I want to send from it to person A. Also, I have send and specyfing that it was sent from "Ajris". Then, i would like to send another message to that person and specify that it was sent from "Iris". So person A has two messages, one from Ajris and one from Iris. When she replies to the message, how am I supposed to know which message did she responde to? As I have checked there aren't any fields in InboundMessage API in Nexmo which allows me to connect received message to the sent one. Is there any chance to do it?
Because person A sends the SMS from a phone using a native client, you can not control the information being sent with the SMS message. There is no information associated with that SMS, so there is no data you can use to correlate it to the message being replied to.
One way to get around that limitation is to use two Nexmo Virtual Numbers instead of one, so when person A replies, you can correlate based on the Nexmo Virtual Number used.
For what you're looking to do - you would need multiple Nexmo Numbers. You can then pull the to field out of the Inbound SMS and use that to map between the two distinct individuals.

Send an email (or any message) once and only once inside a retryable operation

I have a program that is charging a user's credit card. The card is charged via a 3rd party API. When I get a response from the 3rd party API, I update the internal representation of the user's balance. Once the user's balance is updated a receipt is sent to the user via email.
There is a small chance that some server error (e.g. unexpected power outage) could occur between charging a user's card and updating the internal representation of their balance. To protect against this, I've made the entire payment process idempotent so it can be retried without double charging the user but will definitely update the user's internal balance. The only issue is with sending the receipt. There is no way (that I can think of) to make this operation idempotent. Currently, I'm sending an email only of the balance update actually changes anything, but of course the server could fail between the balance update and sending the receipt, leading to a situation where the receipt will never be sent. How do people typically address this problem?
I've marked this question as language-agnostic because it seems to be a general problem with sending messages, but I'm using Java and AWS's Simple Email Service for this so it would be great to get answers using those technologies.
When we have done this before, We used a flag in the object that was set when the notification was sent so that the loop wouldnt send the email if the flag had been set for that transaction/id

How to obtain sent SMS price

Is there way on Android to obtain cost of SMS after sending it programmaticaly?
It would be really nice to know.
Thing is that for example my carrier always sends notification back with remaining credit, but I cannot rely on that every carrier does the same, and parsing it wouldn't be good idea anyway, as there are many different languages in world and text might be formatted differently depending on carrier.
Unfortunately there's no way to determine that as it's all handled on the network side.
There is impossible to determine pricing on subscriber site using standard android SDK API, price known only on operator's side inside its billing system. But, maybe your mobile operator provides an API for receiving bills and only then you it will be possible to define price you charged.
Also, if it is possible to check your balance using USSD or SMS, you may try requesting balance before sending SMS and after.

GCM service - dynamic text

1) i would like to implement dynamic text feature in my server side (java - using GCM) - that mean that i need to custom the push body data to every device but i still want to push to multiple devices at one time.
(using multicastResult = sender.send(mess, devicePushTokenList, 3);
any body knows a way to do it in derver side? (i know a way to do it in the device time before the push arrives)
2) i know apple has a feedback service that i can run in any given time + the feedback of the push response. does GCM has this service too?
thanks!
If you want to use multicast messaging, you will unfortunately need to send the same message.
One solution (which I don't really like) would be to have your app request data from your server upon receiving the message and updating the message appropriately.
You're better off sending messages to each device individually.
As the other answer stated, multicast requires all the messages to be identical.
GCM doesn't have a Feedback Service, and it doesn't need to have one, since it returns an immediate response for each pushed message, and one of the error statuses - NotRegistered - covers the case of devices that uninstalled the app (which is what Apple's Feedback Service is for).

Multiplayer-Game Network Protocol

I am responsible of the network part of a multiplayergame.
I hope anybody of you got some eperience with that.
My questions are:
Should I create an Object which contains all information (Coordinates, Stats, Chat) or is it better to send an own Object for each of them?
And how can i avoid the Object/s beeing cached at the client so i can update the Object and send it again? (i tried ObjectInputStream.reset() but it still received the same)
(Sorry for my bad english ;))
For every time send all data is not good solution, just diff of previous values can be better. Sometimes(eg 1 time for every 10 or maybe 100 update) send all values to sync.
1.in the logic layer, you can split the objects, and in transmission layer you send what you want, of course you can combine them and send.
2.you can maintain a version for each user and the client also have the version number, when things change, update the corresponding version in the server and then send the updates to all the clients, then the client should update version. it should be a subcribe mode.

Categories