This question already has an answer here:
MailApp.sendEmail method doesn't get through to accounts with URL in the body - Message Blocked
(1 answer)
Closed 2 years ago.
Recently I have decided to upgrade to a GSuite account from the basic free gmail account. I have a collection of Google AppsScripts that manage a collection of forms/spreadsheets and send out notifications on changes.
All scripts were copied into the new GSuite account and all seem to run well. All APIs used (spreadsheet, calendar, drive, forms work with the except of the script.send_mail which refuses to send any emails to external email addresses. If I set it to send emails to myself, it works fine, but to any external email and the message gets blocked with this message
Action: failed
Status: 5.0.0
Diagnostic-Code: smtp; Message rejected. See https://support.google.com/mail/answer/69585 for more information.
Last-Attempt-Date: Mon, 30 Sep 2019 14:02:02 -0700 (PDT)
I have created a very simple script to test it and it still fails. Code attached:
function testSendMsg(){
var subject = "Test Message";
var message = " Testing 1 2 3..";
var emailAddr = "emailaddressX#gmail.com"; // put correct email address here
MailApp.sendEmail(emailAddr,subject,message);
}
Sending this email using the browser mail app works fine, only the script based email sends fail. Any help or pointers on this is appreciated.
Google Cloud Support was not able to find any solutions to this!
After a week of frustration trying to figure out why this was not working, it just started working today with no changes. I suspect a new GSuite account is blocked from using this API at the beginning for some reason that I can not imagine and then released eventually after probation period is over.
Related
Hi Good day to everyone here.
My first questions, here we go but i'll try to explain it the best way I could.
I develop auto sending email features using javaxmail in my application for my customer.
Previously when using setting smtp.office365.com I able to send email and the copies of sent email are display in Sent Items folder.
Recently when there are hiccup with smtp office (time out frequently), the IT department at my customer change the setting to use local server instead for smtp (with ip address 172.162.etc.etc). However since the start using this new setting, the email no longer appear in Sent Items but the email still able to sent out ( I test sending email to myself and able to received it ).
Since Im not really familiar and have very limited knowledge on server side for mail server, is there anything I can suggest to the IT department to check for? I only can login the email account on web (https://outlook.office.com/mail/) but when using outlook it required authentication. With web mail i already go thru all settings available and didn't see anything related.
Thanks in advance. Sorry if the question confusing and misleading.
Well, of course - your local SMTP server knows absolutely nothing about your remote Exchange mailbox. It cannot possibly place anything in your Sent Items folder.
You need to send using your Exchange Server - its SMTP server does place sent messages in the Sent Items folder owned by the authenticated user. Keep in mind that MS has recently disabled basic auth in M365. You need to re-enable it for your tenant and the particular mailbox used to send messages.
We have an on-premise hosted Jira 6.0.8. We have set up an outgoing mail server using a Gmail account and used the send test e-mail feature to successfully send an e-mail out.
Our problem is with e-mail notifications. We are not getting any at all. We have gone through troubleshooting docs https://confluence.atlassian.com/jirakb/troubleshoot-notifications-in-jira-203394737.html here but have not been able to find the solution.
Here is what we have already tried;
Ensured user profile 'My Changes setting' was set to 'Notify Me'
Ensured Notification scheme was correct and associated with the project
Ensured Project Notification email was set to the same as the outgoing mail server Gmail address
Checked the 'Mail Queue' after making a comment on an issue and saw waiting messages in it for the correct issue. These then disappeared from the queue without error within 60 seconds, indicating that they had been sent.
Enabled DEBUG logging under 'Logging and Profiling' for the outgoing mail server and com.atlassian.jira.service and com.atlassian.jira.service.services.DebugService. We reviewed the log file and saw nothing that indicated error but did see the log of the MailqueueService sending the e-mail.
have used the 'Notifcation Helper' tool and it verified that the user would receive the appropriate notification indicating notifcation scheme and permission are set up ok.
Still the notification e-mail is not received.
There was a point made in the troubleshooting link above
Check that your Base URL is set to a domain / IP which your SMTP server will accept. Example: Google apps accounts must have a matching base url to their Google Apps domain.
However, our Adminsistration> System>General Configuration>Base Url for Jira is something like http://myservername:8880 since it is internal self-hosted. This did not cause a problem with the test mail. Could this be an issue for the notification e-mails?
Any help would be greatly appreciated.
I have a survey form that people submit the hours they work and it sends their response in an email to me and then CC's two other people. The script was authorized by me to send the emails and has worked fine for a long time until a couple days ago when now I am getting a reply back from all three emails saying Message blocked. Any idea why these are being blocked?
MailApp.sendEmail("myemail#gmail.com",emailSubject,"", {htmlBody: body, cc: "anotheremail#gmail.com, thirdemail#gmail.com"});
If I only send the email to myself then it works perfectly fine. If I include even one CC email address I get the block.
Reporting-MTA: dns; googlemail.com
Arrival-Date: Mon, 12 Nov 2018 04:57:05 -0800 (PST)
X-Original-Message-ID: <000000000000eb73c1057a773c96#google.com>
Final-Recipient: rfc822; myemail#gmail.com
Action: failed
Status: 5.0.0
Diagnostic-Code: smtp; Message rejected. See https://support.google.com/mail/answer/69585 for more information.
Last-Attempt-Date: Mon, 12 Nov 2018 04:57:05 -0800 (PST)
Using GmailApp.sendEmail(emailAddress, subject, message) solves this.
This seems to be an issue with all new GSuite accounts as discussed here:
MailApp.sendEmail() in Google Apps Script not sending email
It is particularly frustrating that Google has no response to this huge shortcoming for over 4 months!
This likely happens when Google algorithms find any suspicious link in the body of your email. You can consider removing any links from the email and try sending the message again to confirm the issue.
The Google support site has more information.
I do not have a clear answer in here; I just want to be able to converse with devs in the same tough spot between a Google algo and a client having his business interrupted.
#amit: First that link you sent does not cover the actual situation. Second I ran my code for a second time manually and it processed everything perfectly so the content is not the sole trigger for this rejection.
To elaborate:
I made a survey tool for a client (with google biz account) that inputs the results in a google sheet with multiple tabs that receive rows of data. Once a day each tab generates a "day summary" of those results and sends it in an email.
It has 1 TO and 2 BCC targets. The body of the text contains multiple email addresses as clickable links. This worked fine till a few weeks ago.
Now today, without changing anything, the emails were sent out with no bounce/rejections. My conclusion is that it is indeed Google's preventive anti-spam filters doing. Just not as simple as "containing links".
Perhaps it's the time? As I see your email, and mine are sent at 3/4 AM, correct? Perhaps it has to do with the CC/BCC emails never being opened? As my BCC targets are both my client's own email addresses (in gmail).
It really sucks that there is no actionable info from Google on this error.
I've been using Contact Form 7 in Wordpress without too many problems. In a current installation, I can send mail to webmaster#domain.com but get an error when trying to send mail to user1#domain.com. I've checked this Stack Overflow ticket:
Wordpress - Contact Form 7 Not Sending to Certain Email
But enabling the SMTP mail plugin doesn't modify the behavior of the bug, and the mail server is not external (like the ticket in question). Any idea what the issue might be? Thanks!
EDIT: user#domain.com is a valid email address and also succeeds when running it against open source online email checkers.
Kind of a hack, but I had this happen to me when I tried to have the emails sent outside of the domain to a gmail account. I ended up adding CC: youremail#gmail.com to the Additional Headers and it worked well afterwards.
I have a domain, call it mydom.com.
A while ago I started using Google App's email server. I set up MX and the rest of the stuff records as Google wanted, and all is working well since.
On www.mydom.com I have a website, DNS and still running mail server (which basically doesn't do much).
Among other things, on www.mydom.com, I have some contact form - basic php page that takes user's input and sends it to predefined email address at mydom.com. It sends it with php's sendmail function.
My issue is - all those email that get sent from localhost to *#mydom.com (by php's function, or possible by some cron jobs reporting some issues) DO NOT go to Google's email servers but instead get picked up by localhost and it's mail server.
So far, I was resolving this issue by setting up a new mail account at Google account, which was basically calling my local mail server by it's IP address, logging into old, abandoned email account and pulling those misplaced emails to the new, #mydom.com account at Google App.
Obviously I'm missing some entry either in local DNS, host file or something..
Does anyone know how do I fix it?
Hey, the same question was asked here: https://serverfault.com/questions/102647/sendmail-to-local-domain-ignoring-mx-records-part-2
and the answer to it works for me, don't forget to include the dot after the domain!
If it doesn't work to the test call and see how the mail traces.
best of luck, svullo