issue is i am facing problem while sending email to subscriber sendy send more than 16 emails to a single subscriber.
while i am using amazon ses.
Regard's
MUHAMMAD Arslan Zia
Make sure you have right settings of cronjob the timing is "every 5 mins" like so '*/5 * * * * php /path/to/scheduled.php > /dev/null 2>&1' I had same problem. It's works for me.
Related
Hello I have a google docs document where I installed a simple emailing code on as follows:
function sendMail() {
var file = DriveApp.getFileById('XXXXXXXX');
var recipients = "mymail#group1.com" + "mymail#group2.com" + "mymail#group3.com";
MailApp.sendEmail(recipients, 'Daily Notes', 'Please see file Attached.', {
name: file.getName(),
attachments: [file.getAs(MimeType.PDF)]
});
}
The code works fine it sends the email to multiple group emails which I want it to send. It has done this for a month now. But until recently, I keep receiving this Mail Delivery Subsystem after 20 minutes or 1 hour from the original email which is sent out and inside the error message email it says:
"The following addresses had permanent fatal errors"
and it points to only one of the emails I send daily mails to. It also says something like this: (reason: 554 5.4.6 Too many hops). and then this:
554 5.4.6 Too many hops 53 (50 max).
The Good Doc's file has Google's time-driven trigger as you can see in the image below. I wonder if somehow the trigger is running twice in the time interval I gave to it. Could it be why this is happening?
In almost all cases 554 5.4.6 Too many hops 53 (50 max) means loop along email delivery path e.g. server A forwards to server B, server B forwards to server A, server A forwards to sever B, …. It is detected by counting Received: headers in message passing via give SMTP/email server.
Suggested fixing procedure:
Inspect Reveived: headers in email bounce message to locate server(s) responsible for the loop.
contact the relevant postmaster
In many years I have seen just one "real life" case when bounce message/email like that was not caused by email delivery loop.
I am using Gmail servers to send email from my system, with a program.
Recently I started getting errors like this:
Data command failed: 421 4.7.0 Temporary System Problem. Try again later (WS). 6sm3756432pab.11 - gsmtp
The reasons are given in the support.
Can anybody tell me what is the number of emails that can trigger this issue?
Or is it because of some other reasons?
If you are using your free Gmail account to send bulk emails your are likely to see this kind of responses early on as the service is not intended to send application transaction messages, newsletters etc., event to subscribers that has opted in.
The IMAP/SMTP service provided is for you to be able to use an email client like Microsoft Outlook with your Gmail account.
If you need to send transaction messages, I suggest you google "AWS SES" for starters.
I agree with Anubhav Shrimali that the error occurs if Gmail gets multiple requests simultaneously.
I had solved the problem using Nodemailer in Node.js by adding the 1 second delay between each successive email as follows:
array.foreach(function(data, index) {
setTimeout(() => {
sendmail();
}, 1000 * index);
function sendmail() {
transporter.sendMail(mailOptions, function (error, info) {
if (error) {
console.log(error);
} else {
console.log('Email sent' + info.response);
}
});
}
});
This error occurs if you are using scripts to send emails in quick successions.
An easy way out is to apply a sleep timer in between sending emails.
I applied a timer for 1 second between each successive email.
import time
time.sleep(1) // equivalent to 1 second sleep
I too had the same issue when I tried to send bulk emails using the multi threaded program in Java. Then I heard about Thread Pool Executor. I used it by setting Thread Pool size as 10. After that, this issue has been solved for me.
If this situation is encountered, it should be placed in the retry queue, and the monitoring will be notified if multiple retries fail.
Hope this link can help you:
https://support.google.com/a/answer/3726730
This is probably a result of bulk email sending from the same IP address. As mentioned, use the python sleep function so that there is a bit of a wait between sendings. I find that 1 second is not usually enough time for me, and I sometimes go with a random number of seconds between 1 and 5 for the most optimal results.
import random
import time
time.sleep(random.randint(1, 5))
Don't forget to import the correct modules.
have a rest for 20 minutes , and try again, the error gone
I am using the below code block in CF9 to get all the mail data,
<cfimap
action="GETHEADERONLY"
name="LOCAL.checkEmail"
secure="true"
folder="Inbox"
server="#ImportAquireMailServer#"
username="#ImportAquireUsername#"
password="#ImportAquirePassword#" />
This query object provides the information about all the mails present in inbox. While doing so it takes a lot of time and also times out frequently.
Is there any way to get the latest mail only, so that it will not provide the information about all the mails and will also not run into time out situation?
Please help.
you may need to update the read messages to "read" like:
<cfimap action="MarkRead" connection = "Conn" messagenumber="#getHeaders.messagenumber#">
after the message id done with work.
so you can query the latest messages as:
<cfquery dbtype="query" name="getMails">
select * from getHeaders
where seen=<cfqueryparam value="no" cfsqltype="cf_sql_varchar">
</cfquery>also you can filter with received date
you can refer http://shemy-coldfusion.blogspot.in/2013/03/coldfusion-code-to-get-multiple-mail.html
I am having problems with this website, it isn't sending any emails. Basically when someone places a order, it sends a comfirmation email. I don't see any problems with the code but I believe this is the right place to be looking for the problem. Can some one help me please?
<cfquery name="getUser" datasource="personal2009">
SELECT * FROM site_users WHERE id = '#session.id#'
</cfquery>
<cfoutput>
<cfmail to="#site_email#" from="#site_email#" subject="Website International Order Request">
#getUser.title# #getUser.Firstname# #getUser.Surname# has requested to deliver an order to an international address.
Their contact details are:
#getUser.Address1#
#getUser.Address2#
#getUser.Town#
#getUser.Postcode#
#getUser.Country#
#getUser.Tel#
#getUser.email#
The delivery address requested is:
#formtitle# #formFirstname# #formSurname#
#formAddress1#
#formAddress2#
#formTown#
#formPostcode#
The order details are:
<cfset thisrow = 0><cfoutput><cfset thisrow = thisrow + 1><cfset tot = 0><cfloop index="list" from="1" to="#session.numincart#"><CFQUERY NAME="ind" DATASOURCE="personal2009" maxrows=1>SELECT * FROM products WHERE id = #listgetat(session.cart, list)#</CFQUERY>
Product Name: #ind.product_name#
Price: £#decimalformat(listgetat(session.price, list))#<cfset multiply2 = #listgetat(session.quant, list)#>
Quantity: #listgetat(session.quant, list)#
</cfloop></cfoutput>
Thank you
</cfmail>
</cfoutput>
<cfset session.endemail = '1'>
Depending on what your hosting environment looks like, I may suggest altering your cfmail tag to the following:
<cfmail to="#site_email#" from="#site_email#" subject="Website International Order Request" server="#server#" username="#username#" password="#password#">
1) If you don't have access to the CFADMIN, you are unable to track your mail path. Specifying your own server/username/password will allow you to send email with your own SMTP server and rule that out.
2) Even if your host has CFMAIL setup with a SMTP default server, it may be possible that they have not setup SMTP relaying correctly. The outcome is your mail gets sent through coldfusion but rejected by the smtp server.
3) Even if your host has CFMAIL setup and SMTP relaying setup, the last possibility could be SPAM filters on the receiving end. If you have SPAM filters that look at SPF/Domain Keys/other criteria, they could be blocking to emails too.
Specifying your own server/username/password is usually the best bet to troubleshooting email issues.
I have a simple email sender for user account activation. Depending on which email address I use, I get significantly different response times: University email - 1 minute, Gmail - 3-4 hours, Yahoo - 1 or 2 days -- which seems bizarre. Has anyone else seen this phenomenon?
EDIT:
There weren't many responses (even for a bounty), but I'll try to explain my problem more clearly.
This probably isn't greylsting -- If I so a simple:
php mail ($to, $subject, $body) // this delivers instantly.
My cakephp code:
function __sendActivationEmail($id) {
$User = $this->User->read ( null, $id );
$this->set ( 'suffix_url', $User ['User'] ['id'] . '/' . $this->User->getActivationHash () );
$this->set ( 'username', $User ['User'] ['username'] );
$this->Email->to = $User ['User'] ['email'];
$this->Email->subject = 'Test.com - ' . __ ( 'please confirm your email address', true );
$this->Email->from = 'noreply#test.com';
$this->Email->template = 'user_confirm';
$this->Email->sendAs = 'text';
$this->Email->delivery = 'mail';
$this->Email->send ();
}
Causes delays from 13 minutes (ok; we'll deal with it) to 5-6 hours (less okay, since this is an activation email). For some of my users, it works instantly, but for other users (of the same service provider, i.e., gmail, it sees these delays).
Any clues?
The code looks fine, but it of course doesn't tell anything about the mail server's configuration.
3-4 hours I would put down to Greylisting, but 1-2 days is definitely too much. Is this reproducible? How many addresses have you tried this with?
What do the full headers of the (received) mails look like? The "received from: .... "path should tell you at which point it took 1-2 days to deliver.
Maybe you can install PHPMailer as a Vendor and create a Component called "Mail"...
And don't forget to authenticate with your SMTP server! :)
Ignore the whole PHP element of it for a moment.
If its a linux server for example, send a mail from the command line e.g. mail myemail#me.com
see if the same thing is happening that way. Its quite likely its a server configuration issue not a php or cakePHP issue.
Look up a few basics like having a FQDN and maybe look into setting up SPF records for your email. Make sure the emails are coming from your domain name not someone elses e.g. not the users email.
Also check if you have email spam software set up that could be grey listing you email on the way out (unlikely but possible). the mostly like thing is the destination spam filter is delaying it. Try send to a gmail account and see if it gets through fine or goes into spam.
Do all this without touching PHP, if all is going fine there then set up a basic php script to do a basic email not using CakePHP, if that works fine then you know its CakePHP etc but I doubt it.
So after further digging, I realized that it was our server host's problem. We use Slicehost, and it just so happens that a range of ips that had been blacklisted included our own ip. We got our name off the list, and we're good to go.