Unable to send an email using PHPmailer in Drupal 7 - smtp

My website https://www.smcin.com/ created in drupal 7 and hosted in google cloud console. I am using PHPmailer smtp module to send email through website using port 25. But not mail has been triggered and give error
"test e-mail has NOT been sent to xxxxxxxx#yahoo.com. You should check
the logs for error messages."
On logs only this message has been shown:
MESSAGE: Error sending e-mail (from xxxxxxxx#xxxxxxx.xxx to xxxxxxxx#yahoo.com).
SEVERITY: error.
I also tried other ports (80, 465, 2525 ) and server (gmail, my official webmail) but nothing work.
I wasted lots of time but no solution found.

Your question is unclear as to which Google Cloud Platform service you are using.
Assuming that you're using Compute Engine, please see Sending email from an instance.
NB "Port 25 is always blocked and can't be used"
You should be able to configure it to use e.g. 465.
You may continue to have challenges in showing a good reputation for your instances' IP addresses.

Related

Remote Server returned '550 5.1.10 RESOLVER.ADR.RecipientNotFound; Recipient not found by SMTP address lookup'

I have an exchange server 2016 and I've created a user, say testuser1#exchangedomain.com
I followed the steps as told in this video:
https://www.youtube.com/watch?v=GN2mZ6qOWf8
I'm trying to send a mail from testuser1#exchangedomain.com in the exchange server to any outlook account in the outside world, for example, username#outlookdomain.com
But I'm unable to send a mail from testuser1 and I'm receiving this error on the exchange server
Remote Server returned '550 5.1.10 RESOLVER.ADR.RecipientNotFound; Recipient not found by SMTP address lookup'
Is it even possible to do so because both the domains are completely different or am I missing something here?
The recipient email account is not found or doesnot exist. Even sending an email from Gmail gives "Address not found
Your message wasn't delivered to username#outlookdomain.com because the domain outlookdomain.com couldn't be found. Check for typos or unnecessary spaces and try again".

Failure Sending Mail using GSuite SMTP

I have a very curious issue with an application. When debugging locally, I can send emails just fine using a client's G Suite email credentials:
<smtp deliveryMethod="Network" from="client#customdomain.com">
<network defaultCredentials="false"
host="smtp.gmail.com"
port="587"
userName="client#customdomail.com"
password="supersecret"
enableSsl="true" />
</smtp>
Now, it's very important to note that the application will send just fine with the credentials when running on localhost using Visual Studio. However, when deploying to LIVE and using the exact same credentials, the application refuses to send and I only get the canned response back saying "Failure Sending mail".
I have enabled "less secure applications" in the settings and have verified the "suspicious activity" from the server's IP address. I can also log in to the Gmail account from the server using RDP and opening Firefox to go to Gmail.com.
No firewall rule has been set to block SMTP or anything on port 587.
UPDATE: the materialized error message is
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.192.108:587
74.125.192.108 being smtp.gmail.com's IP Address (or one of them, at least)
UPDATE 2: I can also not get Thunderbird on the remote server to send an email using the supplied credentials, however it can connect via IMAP and download the contents of the inbox just fine.
Well in this very specific case, it was the fault of the Amazon infrastructure this application ran on. Either amazon themselves, or the reseller changed a policy that ended up blocking communications on ports 465, 587 and 993 (and probably others too).
The "solution" was to nag them to sort it out.

I am running out of SMTP Relays thrice in a week on my VPS running CentOS 6.6

I have a VPS purchased from godaddy runs CentOS 6.6 and I have more than 150 Joomla websites hosted onto this. I have maximum smtp relays alloted from godaddy that is 2000 for now. I am running out of SMTP relays due to some php scripts sending out emails alot and my email queue has lacks of emails to be sent. Earlier, I was also receiving many emails to the address like abc#xyz.com where xyz.com is hosted on my server but abc is not a user/email. In this case my server was sending bounce backs which was utilizing my relays. I have resolved this issue by rejecting such emails for which user is not availabel at the time of smtp check. This solved the problem a bit. But now, everyday a new php file send lot of emails out and utilizes all of my smtp relays. I delete such files everytime I detect this issue but there is not any permanant solution I got yet. Anybody please help me stop this at server level, not for particular website.
You can resolve this issues by disabling php mail function on your server and For the site mail, you will have to use SMTP authentication for your all site so that no one can send mail using any scripts.

Azure cloud VM cannot send out email message using localhost and receive Delivery Status Notification (Failure)

We set up a VM in Windows Azure cloud service. However, the SMTP is not working. All the messages are queuing in the mailroot\queue folder. Here are some delivery failure message received.
Delivery Status Notification (Failure)
Action: failed
Status: 5.5.0
Diagnostic-Code: smtp;550-5.7.1 [x.x.x.x] The IP you're using to send mail is not authorized to 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your
550-5.7.1 service provider instead.
Delivery Status Notification (Failure)
Action: failed
Status: 5.5.0
Diagnostic-Code: smtp;550 OU-002 (COL0-MC1-F41) Unfortunately, messages from x.x.x.x weren't sent. Please contact your Internet service provider since part of their network is on our block list.
How can it be solved? Please help. Thanks
That looks to me as though the receiving hosts are blocking you from sending to them, probably because your IP is on a blocklist. You can check that on http://mxtoolbox.com/blacklists.aspx
You might want to raise a support ticket with Azure and complain, and/or alternatively ask them for their SMTP server settings, which will relay the mail through their servers (which should never be blocked).

Remote SMTP (Google) in vbscript to send email via iMacros

I'm using the Scripting Edition of iMacros web testing tool, I just hope that you know it guys. And I'm trying to use the Google SMTP (smtp.gmail.com) port 465 to send an email via vbscript each time iMacros encountered error during playback. However, each time I run the script, it's giving me this error
the sendusing configuration value is invalid
I've already tried some known fixes but it's still an issue. Here's the script:
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="email#gmail.com"
myMail.To="email#domain.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.gmail.com"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=465
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
I'm using the Windows7 Home Premium. and latest version of iMacros. I hope anyone could lend a hand. Thank you so much.
Try using port 587 for the SMTP. That's what I use in my C# program.
To use googles smtp server you must supply a user name and password to connect with as it's not an anonymous smtp server. I have a Google apps premier account which I use to relay messages through. I'm not sure if Google allow mail relay on a normal googlemail account though.