Why does the mail giving exception as 'Client does not have permissions to send as this sender' when its credentials are working through webmail - smtp

Using cfmail tag to send the mail as a submit action of form in a coldfusion 16 used website. Mail is going to undelivered
list and following error is seen in mail log
'com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.60 SMTP; Client does not have permissions to send as this sender'
The sample mail code used given below.
<CFMAIL to="testusermail#xx.com" from=""testfrom#gmail.com" subject="test mail" type="html" server="xxxmycloudmailbox.com" username="testusermail#xx.com" password="xxxx" port="587" useSSL="no" useTLS="yes">
test content
The mail credentials are correct and is able to login through its webmail.
So,what could be the reason the mail not working programmatically?

Related

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?

Java Mail API host name

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?

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.

How to send email in exchange online (EWS1.1) with shared mail box

I am trying to send an email using Exchange WebServices 1.1 using a shared mail box. I am getting following error.
"This account is locked. Visit https://autodiscover-s.outlook.com/owa/mycompany.com to unlock it."
But if I browse this url, it takes me to admin mail box, then I can change it to visit the shared mail box. Even I can send an email using this mail box from outlook. (All these are already set following a MS article).
My Question is how to send email using these account, as I don't want to make the email personalised and rather keep it from a distribution group/shared mail box.
// Connect to Exchange Web Services as user1 at contoso.com.
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
service.Credentials = new WebCredentials(userName, password);
service.AutodiscoverUrl(userName,
delegate
{
return true;
});
I just want the email should show received from "shared" mail box. How can I achieve this?
Edit :
If I use my personal account all these works fine, I can read emails, send emails and delete emails. But if I changed the credentials to shared mail box, it says the account is locked.
I have administrative and "send as" rights on this shared mail box. At the same time I can send email using outlook as well.
Sanjay

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.