I am currently writing a program for an E-mail system app. In that app, users can sign in with an email account of any domain. For personal email ids, I am using the following code to get the domain name:
String[] temp = emailId.split("#");
temp = temp[1].split("\\.");
return temp[0];
But this method wouldn't work for official email ids like: name#collegename.edu.in. It is necessary to find email domain names to find appropriate IMAP and SMTP servers for reading and sending mail. How can we find email domains for such email ids.
I have a signup from where user need to input their address with pin and city. All are text fields.I want to validate those address given by the user.
Means if a user given some wrong address then an error message will prompt saying address is not valid.
Is there any API so that I can validate the address before user data save on the database.
I am going through this link :
https://developers.google.com/maps/documentation/geocoding/get-api-key
but it was not free.
After lot of searching I can see that from smartystreets.com we can check if a address is valid or not.
But it is paid service and for free service only '250 hits' is eligible per month.
But when I try to call the api from postman I am not getting any response.
API Link:
https://smartystreets.com/products/apis/international-street-api?auth-id=a9e4cd62-78df-be45-5575-65efdb06edf5&auth-token=7YEnKXJD7h20yHDfOfra&country=India&address1=DLF2%20Building&locality=Newtown&postal_code=700056
You can try the Geocoding API by google ,you can pass the address to it and if the address is valid then you will get valid geocordinates else not and you can use it as a bypass trick.
Here is the link GEOCODING API by GOOGLE
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.
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.
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.