We are sending emails with SES.
There seems to be delays in emails arriving for some users. For other users, emails arrive almost instantly. I've switched on notifications and can see the processingTimeMillis is extremely high for some emails:
{
"notificationType": "Delivery",
"mail": {
"timestamp": "2016-04-14T14:02:50.000Z",
"source": "noreply#gmail.com",
"sourceArn": "...",
"sendingAccountId": "884660938610",
"messageId": "...",
"destination": ["foo#bar.com"]
},
"delivery": {
"timestamp": "2016-04-14T14:19:29.072Z",
"processingTimeMillis": 999072,
"recipients": ["foo#bar.com"],
"smtpResponse": "250 sdfgdsg#sdgdsgds.com Received OK",
"reportingMTA": "abcdef.smtp-out.us-west-2.amazonses.com"
}
}
I've read around online but haven't been able to see what may cause these types of delays.
Email addresses and domains are all verified.
I've removed account specific information from the above. The processing time value was not changed.
Thank you to those who commented, led me to find the answer.
There were several email servers which were delaying the emails from being delivered to the inboxes.
SES was sending these correctly and quickly however once they arrived at the destination server, this was taking time to process and release.
Related
I have an integration set up with Google TTS generating audio for a daily Bloomberg email newsletter. It's been working reliably, but I recently received a 400 error for a specific group of sentences:
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT
Sending POST to https://cloud.google.com/text-to-speech/docs/reference/rest/v1/text/synthesize with this payload:
{
"input": {
"text": "Still it hangs together in a rough schematic way, which means you can try it in thecryptomarket. Crypto, particularly decentralized finance, has some key advantages for this, including:\n\n * Weird and fragmented liquidity, so that you can trade with yourself on a futures exchange, and you can move the price of a token a lot on the spot market;\n * A love of mechanical rules and automated markets, so that if your X position spikes from $1 million to $100 million, some decentralized finance platform will say “yup, now it’s worth $100 million, so it’s good collateral for a $40 million loan”; and\n * A presumption of anonymity, so exchanges will let you trade with yourself, and won’t be able to come after you for your losses, since they just have some anonymous wallet addresses."
},
"voice": {
"name": "en-US-Neural2-A",
"languageCode": "en-US"
},
"audioConfig": {
"pitch": -4,
"speakingRate": 1.2,
"audioEncoding": "MP3"
}
}
I've confirmed this behavior is consistent in Google's API explorer, so I think I've isolated the text content itself as the source of the error. I eliminated unescaped characters as a cause by trying a no-symbol version of the text that still failed. API documentation hasn't yielded any clues on allowable characters or other requirements.
The weirdest thing is that the text above works if I delete either the first sentence or the last sentence. Is Google checking the content itself for prohibited phrases or something???
Any other ideas to resolve this error?
I have been able to reproduce this exact same error with multiple AU, UK and US english Neural2 voices using the text you provided. I've also observed this same exact behavior with other random segments of text of my own.
The workaround I've found (and which is working on the text you provided) is to simply use Wavenet voices instead.
Scenario Outline
Test sends a REST API request to activate a game.
Website receives a socket.io event and displays an alert on the browser.
Question
Since I don't know when the event will be sent, do I need to run a WebSocket Sampler, or perhaps a WebSocket Single-Read Sampler, in a loop, until I get the matching message?
So far in my attempts, I can connect to the event server and get message, but they are empty frames or messages are entirely different from the below.
I expect a message like this, which I am able to verify manually using the browser debugger.
{
"locationId": 110,
"name": "GAME_STARTED", <---------------------
"payload": {
"id": 146418,
"boxId": 2002,
"userId": 419,
"createdAt": "2022-02-17T09:10:16",
"lastModifiedAt": "2022-02-17T09:10:22.189",
"completedAt": "2022-02-17T09:10:22.07",
"activationMethod": "TAG",
"nfcTagId": "123423423412342134",
"gameCount": 1,
"app": false
}
}
Alternatively, would this work?
thread A:
open socket
while (true):
read socket
if message ~ 'GAME_STARTED':
break
thread B:
send HTTP REST API request # triggers event to be sent
Here are the parameters used to connect and where I specify the response pattern, which needs wildcards or a JSON expression.
You can consider using WebSocket Text Frame Filter
If you add the filter configured like above it will remove all the frames which don't contain GAME_STARTED text so the WebSocket Single Read sampler will not "see" them, this way you can just have one sampler without any loops or other logic.
More information:
Smart close with filter sample example test plan
JMeter WebSocket Samplers - A Practical Guide
My org sends some 3000 high value (invoices/receipts/statements) per day on behalf of itself and some 10 broker customers. I cannot control email recipients and need ALL bounced emails to be returned to the From: address (these vary per broker) - so they can be actioned. In a nutshell I send from some 10 distinct domains to some 400 distinct destination domains and cannot afford to have emails go missing.
After a bounce occurs, SG adds the recipient to a bounce suppression list and any subsequent emails are then dropped/lost.
The app.sendgrid.com GUI allows me to configure an Allow list where I can enumerate destination domains to be excluded from the suppression process, however I have no control of the destination domains and this is an ever changing list. Not practical.
SendGrid recommended the use of the API, but have just confirmed that this is not a permanent setting but something that needs to be done on a message basis.
My message source is via a dedicated Postfix server via a simple SMTP connector. We are not using the API. I can modify the Postfix server if required.
The API/json payload recommended by SG is:
"mail_settings": {
"bypass_list_management": {
"enable": "boolean (optional)"
}
}
But I am really not sure on how to implement this if this is really required on a per message basis. Possibly using Postfix?
Has anyone else run into the issue? Any recommendation? It is disappointing to say the least that a key feature such as bounce protection cannot be turned off at a GUI level.
Any suggestions on how to solve my predicament?
I can now confirm that prepending:
X-SMTPAPI: { "filters": { "bypass_list_management": { "settings": { "enable": 1 } } } }
Works as expected and undeliverable messages are returned to sender. TY SG support.
I'm using Zapier plus Mandrill to send transactional emails to customers, and want these emails to be logged to the relevant customer account in my Hubspot CRM.
Hubspot supports a BCC address that can do this, and works for my sending domain when I send BCC email directly out of Gmail - so the actual Hubspot BCC functionality works.
However, when I send email from that same domain via Mandrill, the Hubspot BCC does not work.
Comparing the address headers generated by Gmail and by Zapier/Mandrill, I can see that Zapier is creating the BCC address using 'bcc' type for the 'to' array, resulting in a secondary 'to' address for the BCC. Gmail generates an explicit 'bcc' field:
Example BCC-ed address block from Gmail
From: Richard Foxworthy <richard.foxworthy#4thparty.com.au>
Date: Sun, 1 Mar 2020 09:24:24 +1100
Message-ID: <CAGDDT9oRrteY8yek0GppMvfBiMiRNZEAZfJ4JvcpavTY_i69XA#mail.gmail.com>
Subject: testing BCC headers for hubspot
To: First_name Second_name <recipientaddress#domain.com>
Content-Type: multipart/alternative; boundary="0000000000004b1468059fbe6b8a"
Bcc: UniqueHubspotID#bcc.hubspot.com
Example BCC-ed Zapier/Mandrill address block (JSON, retrieved via Mandrill API)
{"from_name":"Vram Name","from_email":"email#domain.com","subject":"Subject line goes here","headers":{"Reply-To":"sendingaddress#domain.com","To":"recipientaddress#domain.com"},"to":{"email":"UniqueHubspotID#bcc.hubspot.com","name":""}
And here's an extract from an API log from Mandril relating to one of these emails
{
"key": "Mandrill_key_goes_here",
"template_name": "Mandrill_email_template_name",
"template_content": [
{
"content": "<h1>html content</h1>",
"name": "$main_title"
}
],
"message": {
"from_email": "sendingaddress#sendingdomain.com",
"from_name": "Sender Name",
"subject": "Subject line",
"headers": {
"Reply-To": "sendingaddress#sendingdomain.com"
},
"to": [
{
"email": "primaryrecipient#recievingdomain.com"
},
{
"email": "UniqueID#bcc.hubspot.com",
"type": "bcc"
}
I'm assuming the problem with Hubspot logging these mails is the absence of a BCC field in the email address headers.
Looking for guidance from anyone who understands these systems in better detail:
Is this actually what's causing the problem?
Any recommendations how to resolve the problem?
Thanks
I found a solution - posting it hee in case it helps others in future...
On Mandrill side its possible to set an option "Expose The List Of Recipients When Sending To Multiple Addresses" which preserves the list of recipients when there are multiple CCs or BCCs or whatever.
It turns out that by turning this on, Mandrill passes the right message header so Hubspot can recognise and log the BCCs.
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