User Name in Spring Send Mail API - java

How to pass the different user name instead of displaying the from email name in mail received to the end user java send mail API.

Atleast you can google first for your question. Anyways refer this.

Related

Is it possible to get details of the email for which user had replied?

I am using amazon SES to send notification emails in my project. When a user replies back to this email I want to trigger some actions (like a ticket creation or update). Is it possible to know the contents or headers of the email for which user is replying ?
If the replying user's email system supports it (most do), you should receive an In-Reply-To: Header containing the message-id of the email you sent. If you kept that message (along with the message id) you can use this to retrieve original email.
Sometimes the Refereces: Header might be useful as well

Find a JIRA user by e-mail address with JIRA REST API

I'm using JIRA REST API for accessing JIRA from a third party application.
I'm trying to find whether a user account exists in JIRA for a particular e-mail address. The same is working for user name but not for e-mail address.
Could you please let me know how to do it? I have gone through this documentation.
According to the document you linked, the REST call
api/2/groupuserpicker
searches by username OR email address.
parameter type description
------------ ------- --------------------------------------------------------
query string A string used to search username, Name or e-mail address
If it's not working with an email address then you should be submitting a support request to Atlassian.

Is it possible to mask/spoof email address while sending mail in Java

In simple word, whenever I will send mail to anyone (within same mail server) it should appears some fake email address i.e. fakemail#gmail.com but, when they reply to this mail, it should come to my actual email address that is realname#gmail.com.
Note: My both email addresses will use same domain name, but only difference will be fake and real username for that email. I needed for the privacy issue. So, that nobody can reply to my mail directly until I send any mail to them.
Ask your mail server administrator to setup an email forwarding for you.
This is not a Java specific question. What you are asking for is called an
Email alias, and is a standard functionality on mail servers.
You can use a fake "from:" field and a valid "reply-to:" field, but the only people that will be fooled by this are people who would not know how to send spam anyway.
Even if you can (see below) mask the From field, you are giving away your email address in the Reply-To field, so you are still revealing your email address. (And if you weren't, it wouldn't be possible to reply.) So go with #Anony-Mousse and find a proper solution.
Now, please note that there are two "from" fields: one in the SMTP envelope and another in the message data.
It is quite uncommon for current mail servers to let you fake the SMTP from, though it may be possible if the server is using raw SMTP without authorization.
You are more likely to be allowed to send an email with a custom "From" in the message body (which is the one mail clients display, unless you look att all headers). However, the mail server may require that it matches the user you authenticated as.

Add or request a user to add email id to contact list. Is this possible automatically using javamail ?

I have written a java program to send email via SMTP. I would like to know how I can request the user to add my email Id to his address-book/Contact list in his client automatically/manually. Is there a way for me to do it from within my java code. I would like this feature as my emails will not get listed as spam/junk. I am using javamail API.
Thank you,
Nagarajan
NOT POSSIBLE!! You can't do that ,Email will be just mail.Listing your emailid and other things(spam,junk mail) to be done by receiver only.Who receive they have to configure.

email sent without putting the password into the code

Is there anyway to get an email sent without putting the password into the code ?
There are many email api-s that enables to send an email with entering the username and password.
Example
sendEmail("myemail#gmail.com","mypass","subject","msg body");
Is there any way around the problem with hard-coding the password in code ?
You have three options to send email:
You include your email and password into the code and in this case
the application will send emails from this email address.
You can ask user to enter his credentials for his email and in this
case you'll receive a mail from user's address.
You can form an intent in your application that will fill neccessary
fields and call user's email client to send this.
If you want silent way to send email then you should choose 1 or 2. But more secure way is to use the third approach.
You can ask the user password one time and then store it in your internal storage. It may be necessary to add a way to change the password later if preferred. Deciding from documentation, the internal storage is even secure, while it is also possible to use additional encryption. This is how most of E-mail clients work.

Categories