How can I send email to unicode email recipient through java mail - spring

How can I send email to email address like महाराजा#test.com? I am using spring and java mail for sending emails. I get exception javax.mail.internet.AddressException: Local address contains control or whitespace in string while sending the email.

Unfortunately javax.mail does not yet support the RFC 653x family of standards that enables internationalised e-mail addresses. Bug tracker
Actually right now very little internet mail infrastructure supports it, so you're probably not missing much, yet.

Related

How can I replace the originating e-mail adress in Azure Api Management Service?

In Api Management Service, when someone subscribes to an Api, they gey a mail from a no-reply address. By default, this mail is something like "apim-noreply#mail.windowsazure.com", I changed this in de settings to "no-reply#myorganization.com".
But now when a user receives an email, both these addresses are listed as the sender address. How do I fix it to only display my custom address and remove the default one (circled in red)?
I tried looking in the mail templates to see if it was present there, but it wasn't.
I tried finding a solution in Microsoft documentation but couldn't find anything.
I understand that you wanted to change the "Mailfrom" header to a value of your choice. Currently it is not possible. The "MailFrom" header contains information about the actual sender of the email since APIM sends the mail you will not be able to remove apim-noreply#mail.windowsazure.com due to security issues.

PHPMailer thread/conversation in outlook not working

I've achieved the "conversation/thread" effect in gmail, using this code
$phpmailer->MessageID = $message_id;
and with this, in gmail all e-mails sent (with the same value in $message_id) are received in the same "conversation/thread", but this dont work in outlook, both windows 10 email app and outlook app for windows 10...
How can i achieve the same result as in gmail in outllook?
Don't re-use the same message ID for multiple messages. There are headers specifically for creating threads, and the definitive explanation for them is here. In short, add the Message-ID of the message you are replying to in a References header, and optionally also into an In-reply-to header. You can create those headers in PHPMailer using addCustomHeader().

Is there an API to get e-mail smtp information (for GMail)

I want to send an e-mail using gmail API.
I want to know if the email was received successfully. And if not, what the problem. (Such as SMTP Log)
I can use Google Admin G-Suite if need.
How can I do it?
Thank you.
What you are looking for is Request read receipt after an email is sent. This would notify the sender when the recipient reads the email.
This is not something that is currently available in the gmail api. you may want to consider submitting a feature request here

Using AWS SES with international email addresses - RFC 2047

I'm working on a product for Japanese clients and am getting an error when trying to send to email addresses like ああ#ああ.blah.jp AWS SES (simple email service) rejects the email address:
Aws::SES::Errors::InvalidParameterValue (Local address contains control or whitespace)
The SES docs say that you need to use RFC 2047 encoding which I am. ActionMailer encodes these addresses automatically so what gets sent to SES looks like:
=?UTF-8?Q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E6=83=85=E5=A0=B1=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E6=83=85=E5=A0=B1=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E6=83=85=E5=A0=B1=E3=83=A6=E3=83=BCsfd=E3=82=B6=E3=83=BC=E6=83=85=E5=A0=B1#sdfds.com?=
I don't understand why I'm getting the error.
Looks like it's not supported by SES yet. Documentation is confusing on this topic.
Duplicate of this question.
I realised that user email contained whitespace the the end. So I removed the whitespace and it starts working

How to know mail send or not send in laravel and which recipient is not getting it?

Hi I am using the bellow function, can you please guide me how can I use Mail::failures(); in it
Mail::send('emails.caregiversetprimary', $templateArray, function($message)use($email)
{
$message->to($email, 'username')->subject('my subject');
});
Mail::failures(); < ====== this gives me black array as I have used wrong email
I am using laravel 4.1
tl;dr
You can know which recipients the email has been sent to but no which recipients have received it.
details
You need a better understanding of how mail servers work. From a Laravel point of view, there is no way (or at least not a simple one*) of knowing which recipients got the email. Its a matter of how mail protocol works. You may know which recipients the message has been sent to but no which recipients actually got it.
With Mail::failures() you get a list of recipients to which Laravel tried to send the email but it failed on actually sending it. But again, if it has been sent there is no straightforward way to known if the mail reached their inbox or no.
*If you happend to use Mailgun, Mandrill or any other 3rd party software then you are not dealing with a mail server 'per se' but with an API service. May be you could check the mail service provider documentation to research if they perform any kind of delivery tracking that you can programatically check.

Resources