0

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?

user40991
  • 173
  • 1
  • 3
  • 11
  • Please clarify. Are you saying that you login on webmail on server `xxxmycloudmailbox.com` as user `testfrom@gmail.com` ? – jhnc Sep 10 '20 at 08:28
  • What I meant was have given different values for from attribute and for username.For instance, for a form submission,the email value entered by the customer is set to the from attribute which means that is dynamic. Is there any significance for from attribute in mail tag and mailserver username? I could login the webmail using the mailserver username and password attributes-testusermail@xx.com/xxxx. – user40991 Sep 10 '20 at 11:07
  • A simple rule of thumb is: If the email address does not belong to you, then you must not claim to be sending from it. To send "on behalf of", I guess you can set `from` to **your** email address and `replyto` to that of the user. – jhnc Sep 10 '20 at 12:33
  • ok,resolved by making mailserver username and from attribute same values – user40991 Sep 13 '20 at 12:57

0 Answers0