Python FlasK Mail. 4.3.2 Concurrent connections limit exceeded - outlook

I am trying to send mail using python flask_mail module.
The email I am using is hosted/created by godady outlook. It is able to send email successfully. However, when there are multiple users that trigger sending of email functions, I get the following error:
raise SMTPDataError(code, resp)
smtplib.SMTPDataError: (432, b'4.3.2 Concurrent connections limit exceeded. Visit https://aka.ms/concurrent_sending for more information. [Hostname=H...apcprd04.prod.outlook.com]')
How do I go about solving this issue? I was thinking if this is server imposed limit, I have to somehow queue the email sending function call, and send email one by one.

Related

How to ensure server has sent emails in Jmeter

I'm running a load test in jmeter for a registration scenario. In that scenario, there is a situation where an OTP is sent for the email address provided. Is there a way to ensure that the email has been sent when running the test script. All the email addresses i use are dummy addresses getting from a CSV file. I do not wish to read the email or get any data from it. I simply am required to know if the emails has been sent when a certain http request is hit.
I don't think you can "know if the emails has been sent" without actually receiving it so instead of "dummy" emails you can:
Set up a local mail server, i.e. test-mail-server or real email address(es)
Configure your application to use this test mail server (or real mail server) for sending emails
Configure JMeter to read emails from this test mail server using Mail Reader Sampler. Check out How to Create a JMeter Script to Check Email During Registration AND Grab the Confirmation URL article for more information.

ColdFusion API and Websockets

I am hoping someone can point me in the right direction. I have a CF2021 Server which uses a Node.js websocket server and CF pages (via javascript) as a client. Messages from user to user work as expected, so no issue there.
This CF Server also has a custom API built using CFML that handles and routes inbound SMS messages. My question is; what would be the best way to send the SMS message (by now its json) to the Node.js websocket to it can send it to the user(s).
I tried using the same javascript that the browser client uses, but it appears that the CFML API script is "browser-less", so that doesn't work, or should it?
I thought something like Apache Groovy may be the solution, but I am having difficulties with any websocket example I have found.
Any suggestions would be greatly appreciated.
thanks in advance
Flow matters.
If you want to handle an incoming message by delivering it to all currently logged in users who are subscribed to messages of the current sort: set up your message handler to deliver using lucee/adobe-coldfusion websockets. Be forewarned, Lucee takes some setup time, but once running, it is a great solution.
If you don't need immediate delivery, or you need a super simple solution: I actually have had some success with "Long Polling" you just have to remember to use "flush" early in the request, before any pause/sleep, then loop your message lookup requests for new data, with a 1-5 second delay between each loop. Once new data is found, I like to return the request to the client, close that polling request and start a new polling request using the client side. I typically won't poll for more than 60 seconds. Even if the returned json object is empty.

In a group chat, should the new message event (websocket) be sent by the client or the API?

I have a doubt, in a group chat system that has a database with a rest API, who should issue the event of a new message?
The client or the endpoint to create the new message?
For example: X user sends a message to group Y, then uses the api endpoint api.com/message-create and that endpoint emits the message-create event through websocket
Example 2: X user sends a message to group Y, then uses the api api.com/message-create endpoint and the endpoint does not emit the message-create event, but was emitted when the user pressed the send message button
I still don't quite understand if it would occupy more websocket channels to achieve that, if a global one is enough, etc.
The server should be responsible for communication logic. So your first example is better.
But: why do you use two communication channels for sending an creating messages?
If you use websocket, you don't need create a message from a client by using additional rest endpoint.
This approach is prone to errors. For example if the client will loose network connection after sending message through websocket and before executing call to the REST endpoint?
The message will not be stored in a database.
Your flow should looks as follows:
User clicks the send button.
Message is send through the websocket.
Message is stored in the database asynchronously (you can do it directly from communication server, or use rest endpoint)
Emit "new message" event to the group.

Unable to send email with Attachment in Jmeter: Response code:500 Response message:IOException while sending message

I am facing an issue while attaching a file in my SMTP sampler.
Below are the steps performed:
1-Writing the Summary Report results into a file/folder i.e D:/ABC/XYZ${__time(ddMMyyhhmmss)}.csv (It successfully write on that path)
2-Attaching the same file i.e D:/ABC/XYZ${__time(ddMMyyhhmmss)}.csv in my SMTP sampler against Attach file(s) field.
Now I Execute my Script and got this error.
Response code:500 Response message: IOException while sending message
And after that, when I don't attach any file. My script runs successfully.
One more thing I want to add. Earlier to this script, I was able to send the attachments too but those were from my Gmail account added in SMTP. And now I am doing it from my company's email account i.e. using outlook in SMPT sampler.
Please guide me in resolving the said issue.
Your ${__time(ddMMyyhhmmss)} will generate different results each second:
so you most probably need to amend:
first usage as ${__time(ddMMyyhhmmss,timestamp)}, this way the first function call will store the generated value into timestamp JMeter Variable
second, third, etc. as ${timestamp}
Outlook is an application which can access multiple mailboxes using various protocols like SMTP, POP, IMAP or Microsoft Exchange. JMeter supports first 3, but if your company is using MS Exchange as email transport - you won't be able to use SMTP Sampler, you will have to switch to JSR223 Sampler and write your mail sending code in Groovy using library like javaxt-exchange or EWS Java API

Error when I send email SparkPost

First the "email send" works fine but now It doesn't work anymore and when I print the error this is the text:
ERRORE {"name":"SparkPostError","errors":[{"message":"Message generation rejected","description":"Exceed Sending Limit (sandbox)","code":"1902"}],"statusCode":400}
Anyone can explein me how I'm wroing?
This error says that you have reached the limit of messages sent from sparkpostbox.com and now must register your own sending domain. You can read about how to do that here.
Each new SparkPost account may send a fixed number of messages addressed 'From:' sparkpostbox.com. After that, the idea is that you register your own sending domain and send from that instead.
The sandbox options allows you to send using the #sparkpostbox.com domain. It is currently limited to 50 sends for the lifetime of the account. At this time you should have a verified sending domain to use going forward. If you are looking for information on testing using SparkPost, take a look at this support document: https://support.sparkpost.com/customer/portal/articles/2361300
Source of the answer for your question is there: Error "Fatal SparkPostError: Exceed Sending Limit" when sandbox=true

Resources