Sending attachment using AWS SNS(Simple Notification Service) - amazon-sns

I am using AWS SNS for sending alert emails. Now the email content is really long therefore I wish to send it as a file attachment rather than sending it as a email content. Can this be done using SNS ?

No, it can't.
The SNS FAQ does not come out and explain this explicitly, but it can be inferred from several statements:
Amazon SNS messages can contain up to 256 KB of text data, including XML, JSON and unformatted text.
The ”Email” transport is meant for end-users/consumers and notifications are regular, text-based messages which are easily readable.
In addition, since you do not have access to the email header space when publishing to SNS, it is not possible to specify the necessary multipart coding for an email client to decide an embedded attachment. You can't even send HTML emails (well, you could, but a standards-conforming email client would not render them as HTML).
Now, many email clients will theoretically recognize http://... in an email body and turn them into clickable links, allowing you to link to the desired file... but that of course is not the same thing as attaching files.
I there does not appear to be a mechanism for attaching files to emails in SNS.

Related

Firebase Hosting - How do I get HTTP body payload

Firebase hosting has been excellent, up until now. It is very fast and very cheap. Alas, there is absolutely no access to any server-side activities such as you normally would with PHP.
I'm using Opayo 3D Secure to process payments. Part of this involves showing an OPayo webpage inside an iframe to capture bank card details. This then returns another URL from a bank that issues a question to the card's account holder. When complete, the bank sends a POST message to my website with two parameters that I then use to complete the transaction. I can see these parameters in Chrome's Devtools but I have no idea how to access them using Javascript.
Here are the returned values (cres and threeDSSessionData):
It is not possible to use fetch() or XMLHttpRequest() to get the response. The URLs provided must be presented using iframes.
Obviously, Firebase Hosting is passing the HTTP headers and body back to the website, as can be seen from the Devtools, but how do I get hold of them?

How to send external message in R (without providing sender account)

Is it possible to send an external message (e.g., and email or SMS text, tweet, etc.) via R without providing a sending account?
If so, how would one send a quick message to an email account or mobile device using R in such a way that doesn't require a sender account input?
Example usage: to inform user when code is done running.
I've seen other SO posts discussing how to send emails (e.g., here and here) and texts via R, but none of these sources discusses the possibility of doing so without providing an explicit sender account (i.e, credentials).
Disclaimer:
This is not for sneaky business, but rather to simplify security/privacy.

E-mail sending using Gmail

I've developed an email application which can be consist of several attachment.size of those attachments could be 20MB or even higher and i'm using smtp.gmail.com as my host.my issue is it's very slow.i think it may because attachments are uploaded when the Send() mail function is called.is there any option to solve this issue?
The bottleneck is your Internet connection upload speed.
The only way to resolve this issue is to lease a faster Internet connection.
On most broadband connections, you should expect this upload to take at least 100 seconds (200k per second upload).
Web Email Clients (Like Gmail) get around this with asynchronous uploaders. The attachment begins uploading as soon as you select it (even while you are still typing out the rest of your email, before you hit send). Unfortunately, I do not believe there is an API that allows async file upload to GMail for this purpose.
With that said, you may be able to do an async upload to another server, and simply link to that file in the emails that you are sending.

Mass mailing HTML-newsletter in Asp.Net

I'm developing a site where I need to send HTML newsletters to a mailing-list.
I have build a html frame where I have my "View in browser" and "Unsubscrib" links (which of cause will vary). In the admin module, I post html and uploads images for the html-newsletter. Is this a good way to do it?
How should I send the e-mails the XX.XXX persons? I can't use BCC because the unsubscribe link will vary. So I guess I have to sendt all the e-mails seperately. But the code shall be fault tollerant so only half get the newsletter if there is a error.
Best regards,
Lasse
Hope these are helpfull:
Use MailDefinition as a templating engine http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.maildefinition.aspx If your numbers are large you may look into not using SMTP as a transport protocol, but rather generating files for each email you wish to send and then putting them directly into the "Drop" folder of your SMTP server. Mirosoft SMTP Server allows this quite easily.
Use a unique bounce back email address for each email (but include a reply-to to a real address, such as office (at) yourdomain.com. Let those bounce back email addresses point to one common account and after sending your newsletter remove all addresses that bounced from your database.
As for fault tolerance, I don't think I quite understand. Why would you only want half to ge the newsletter? I would catch any server related issues and stop the processing immediately, and any client related issues (client's email does not work, see 2.) are either skipped and logged (if detected during processing) or processed later (if detected later).
Depending on your local laws check opt-in/opt-out policies.
Also take a look at embedding images directly into the html (a not well known fact is that you can embed images directly into ) this will usually make email size larger but it will let Outlook display those images directly without going to your server. Of course if you want newsletter tracking via an image beacon or similar then server images are what you want.
Of course check all common email clients for correct display. AFAIK it is almost impossible to send a format that each and every client will display correctly unless you send plain text :)
yes you will need to send the emails one by one if you want a unique unsubscribe link for each client. you may send the same email to everyone if you put a textbox on the page where people can unsubscribe by typing in their emails.
as for the email being sent out, you have the right idea. you need to host the images on your server and call these from you html.
the html must be basic html 3.0 or something of the sort. this will ensure that most email clients will properly render your email.
be extra careful when making a mailing list, it can be very easy to get banned from certain servers such as google or hotmail.

Is there any mail queue system in ASP.NET?

Is there any mail queue concept in ASP.NET?
I want to send thousands of different mail to thousands of users (i.e. each user will have a different mail). I want to send the mail at a particular time, so each user receives it at a constant time.
There really is not mail queue in the Core framework. You can send individual messages synchronously or asynchronously, but you can't really send a bunch at once.
You can queue your messages by storing them to a database or file server and then kicking off a job to loop through your saved messages and send them off.
Also, not all of your users will receive the messages at the same time, even if you could send them at the same time. There are too many external variables and dependencies (network traffic, mail server loads, spam filters) to accurately predicate when or even if your users receive their messages.
There's no native MailQueue concept within .NET framework. The queue will have to be implemented yourself. In your case, you would like the mails for each recipients to be sent at about the same time for all batches. Am I right?
Well, this is a bit tricky. You can use any SMTP server, localhost or external ones. But that also mean although you can dispatch to the SMTP server at a specific time, there's no guarantee it will reach the recipients immediately.
There are a whole bunch of stuff on mail delivery which are not exactly programming related (grey listing, spam filtering etc etc).
The alternative is to have full control on the sending and have your app directly sending the mails to the recipients' mail servers. Well that is workable and I suggest you use a commercial or a good open source component for that. Anyhow, there's still a whole bunch of issues you need to deal with, (e.g. some receiving mail server like Yahoo might block the sending a few times and let it through after a few retries).
I've posted a related question, take a look at the replies here.

Resources