Java Mail API host name - smtp

I have implemented IMAP server mail box and one valid user account on that mail box for receiving email and reading mail.
Now I want to send mail through that user account. After goggling for some time , I found that we can't send mail using IMAP server.
So now the problem is I want to send mail using that mail account only. Is there any way?

Related

Setting up mail smtp relay service to send and receive mail

I have very limited knowledge about SMTP and IMAP/POP. SMTP --> sending message, IMAP--> Mainly for receiving messages.
I have a woocommerce website and i already did setup my email system to use SMTP relay using zoho. I believe zoho also provide mailbox services since I am able to communicate with my customer(both two and fro) using its email service. They have their app and i can receive and send mail from that app. Obviously, I have set up all the records including MX to send/receive the email to my zoho inbox.
No i want to move my email services to postmark or like sendinblue. All i can see the setting related to sending the mail but how/where will I receive the mail when user reply on that??
On the postmark website it says:
Since Postmark is not a mailbox provider there's not the ability to generate mailboxes for receiving email using IMAP or POP3.
Question 1) Does the SMTP relay server is actually a different physical machine from IMAP server for sending/receiving messages. I guess both are different but why are these companies not providing solutions like zoho. Pardon me if I did not understand the use case.
Question 2) What to do in this case ???. My case is simple. I send notifications to customers regarding their orders. If they want they can reply or enquire. I receive the email on my phone and I can reply on the same mail-chain like we have on Gmail.
Question 3)
Do i need to buy some another service along with these to receive and reply back on the email ??? Like from godaddy or somewhere else.

Emails does not save in Sent folder when using SMTP

I'm using Apache Commons Email in user application for mailing purposes. Letters sends succusfully and client recieves it. The problem is sent emails does not save in Sent folder on server. My code:
MultiPartEmail email = new MultiPartEmail();
email.setHostName("smtp.ukr.net");
email.setSmtpPort(2525);
email.setAuthenticator(new DefaultAuthenticator("****#ukr.net", "****"));
email.setSSLOnConnect(true);
Is it the problem of email smtp provider or problem of my code?

Windows phone 8 - Sending Mail in background

Is it possible to send mail in background that is without prompting any user action if user has some email account sync in phone?? I believe EmailComposeTask only shows up a screen that requires user action to send the mail. What I need is to send the mail in background without any overhead to user. Thanx in advance.
You can't send an email from the user's email account without his approval.
What you can do is use your own server and php script which you can then call from the app to send the email for you, like it's done for error reporting services.

Set IMAP hostname while sending email using JavamailAPI

I have a IMAP server host name : xyz.com. And my SMTP host name is : comcast.net.
Now when I send emails via Outlook it automatically shows my ID [sender ID] as : myusername#xyz.com and not myusername#comcast.net.
I would like to achieve the same using JavaMail API.
When I use JavaMail API, it shows the sender as myusername#comcast.net. I understand this is the way it works. IMAP for receiving emails and SMTP for sending emails.
However, I would like to develop the behavior similar to that of Outlook where it sets IMAPs server hostname, instead of the SMTP's server hostname, in the sender ID.
Thanks & Regards,
Ravikiran Mane.
I think you're talking about the difference between what you put in the From header of the message (using the setFrom method), and what user name you use when you login to your mail server to send the message (using the connect method). Normally they would be the same. Your mail server may or may not allow you to set a different address in the From header. Some mail servers will require you to verify that the alternate From address is actually your address before they will let you send a message with that in the From header.

Preventing Recipients from getting an email. - How Email Processing Works?

When you send an email with this:
From: Jeff#yahoo.com
To: XXX#aol.com, XXX#aol.com, XXX#aol.com
CC: james#gmail.com
Which Mail Server sends the message via email to the recipients in the TO & CC field? Is it the SMTP server or the server owned by the recipient (like aol.com)?
When you write an email and send it, you will hand it off to some SMTP server you have access to. That server will then contact the recipients server (or intermediate server) and deliver the email to that SMTP server. The SMTP server on the receiving end will somehow, depending on their setup, deliver the email to their users.
In your example, you will properly give yahoo.com's SMTP server the email. Then that server will contact aol.com and deliver the email there. It will also contact gmail.com and deliver the email to their SMTP server.
You should read this part of the SMTP rfc which have a very good explanation about the process.
How you will go about preventing that an email is delivered, is to somehow control one of the SMTP servers that is contacted in the process - or not send the email at all. When you see the email delivered in your own mailbox, it is properly way to late trying to prevent the other recipients receiving the email.