When i reply an email i get the email in thread and the receiver get the email as a new email not in a thread. How to tackle this issue?
I tried adding this
message['In-Reply-To'] = message_id
message['References'] = message_id
Related
guys! I have a task to create AWS lambda endpoint for resetting user's password. I have to send a new password to user's email. I have read a lot about SNS and SES and currently have no idea what service is better for my purpose. Will be glad to hear from you advice!
Here is my lambda code
const requestData = AdminResetPasswordDto.from(event.body);
const errors = await AdminResetPasswordDto.validate(requestData);
if (errors) {
return new BadRequestError({ message: "errors.invalid-request-params", errors })
}
const repo = new UsersRepo();
const entity = await repo.getOneByEmail(requestData.email);
if (!entity) {
return new BadRequestError({ message: 'errors.user-not-exists' })
}
// const newPass = generatePassword();
// sending newPass to user via SNS
// use SNS or SES ???
// https://docs.aws.amazon.com/sns/latest/dg/sns-email-notifications.html
const user = UserDto.fromEntity(entity);
const result = await repo.updateUserPassword(user.userId, user.userRole, newPass);
if (!result) {
return new BadRequestError({ message: 'errors.password-not-updated' })
}
return new ResponseSuccessNoBody();
SES is meant for sending high-volume e-mail efficiently and securely. Once you have verified that you are the owner of an e-mail address, you can send e-mails through SES to any other e-mail address without the recipient's consent. SES takes care of the engineering required to ensure the delivery of their e-mails.
SNS is meant as a channel publisher/subscriber service. In order to receive e-mails from SNS, the end-user must first subscribe and approve that subscription through e-mail before amazon delivers e-mails from the subscribed channel to that end-user. End-users can subscribe via e-mail, SMS, webhooks, and other means up to the user independent of the publisher.
On a practical level, we use SES to send our users e-mails about their content and we use SNS to send our developers notifications (via SMS and e-mail) when servers go down or have issues.
In short,
SNS
email messages
SMS
push notifications to mobile device
messages between services/apps
Clients have to subscribe, to receive above notifications
SES
email messages
No subscriptions required
SNS is used for “technical” notifications; delivery as e-mail is possible, but rather limited. First, you need to create dedicated subscriptions and provide the destination mail address at this point. Second, you can’t really “design” your messages, it will just be a blob of text. You should go with SES for messages where the recipient is determined at runtime and you want to have control over the message layout.
I am using the sample code provided by docusign, but there is no indication in response if the envelope is actually sent or not.
If the email does not exists, it still generates the envelope id and there is no error.
here's the response:
Please enter the signer's name: saf
Please enter the cc email address: scisaif1#gmail.com
Please enter the cc name: saif
{'bulk_envelope_status': None,
'envelope_id': 'bd7781a5-ea9e-472d-b087-90baa12b573f',
'error_details': None,
'recipient_signing_uri': None,
'recipient_signing_uri_error': None,
'status': 'sent',
'status_date_time': '2022-08-14T10:02:02.9400000Z',
'uri': '/envelopes/bd7781a5-ea9e-472d-b087-90baa12b573f'}
Your envelope has been sent.```
this is the response when email does not exist, i get an email that says
Documents you sent for electronic signature could not be delivered to this email address: adfasasdfasdgasddf#gmail.com
The internet email system is a weak creature. If DocuSign receives a negative delivery report, then the envelope status will be updated. (Try a bad email on the DocuSign web app.)
But there are bad email addresses that don't result in a negative report to DocuSign.
For these cases, the envelope's expiration tells you that there was no response.
I suggest that you ask the signers for both their email and sms mobile number. DocuSign can then deliver the signing invite to both.
Suggest you use DocuSign Connect and set a webhook. This will give you an event if email bounced, or opened. You can use these events to decide what to do in your system.
I'm trying to send an email in a 2.0 suitescript (scheduled). My code is very simple:
email.send
({
author: 123,
recipients: 123,
subject: 'Errors',
body: 'Please see attachment'
})
That's it. The email shows up in the Sent Email list, which seems to show everything fine:
Sent Date 04/27/2021 17:21
Log Date 04/27/2021 17:21
From "<my name> (<my email address>)" <system#sent-via.netsuite.com>
Subject [SANDBOX] Errors
To Recipients <my name> (<my email address>)
CC Recipients
BCC Recipients
Message-ID <fknhf2pr4jqaxt5dmqc56ab2353384v9zj0qr1i6ke5fz9n3o7u6w0o8alojgm0w#netsuite.com>
Status Not Sent
Unchecked Compliance Verified
Body Please see attachment
I note, however, that in the sent email the RECIPIENT list is empty - my email does not appear; no emails do.
The email doesn't arrive. So no apparent errors - it just doesn't arrive, and NetSuite says it was not sent, although it doesn't seem to say why.
Check Sandbox "email delivery preferences". As an Administrator go to Setup > Company > Email > Email Preferences > Sandbox and Release Preview subtab (Sandbox Options heading). There are options there to dictate who Sandbox emails are sent to. You can reference Suite Answer Id 20152 for more information. If there's still as issue confirm the specified employee internal id actually has an email address stored in the record.
I've set up some google apps mailing groups, but emails from nodemailer to the groups are always getting 'bounced' (but no bounce-back email).
Individual gmail addresses receive the same nodemail fine. The admin email log looks like this for successful email to individual gmail user address. The email headers from the successful email show no issues (eg no spf failures).
The groups do receive emails from external users (including from the same address nodemailer uses) when sent through the gmail web client, so it it isn't a group permission issue. Successful emails to the group yields an admin log like this.
The group is set to forward all spam to users.
Nodemailer is using a gmail account, and the GApps are using a Google domain hosted address, so it shouldn't be an issue with routing or conflicting servers
What am I missing here?
This was resolved by reconfiguring the 'from' field in the nodemailer message.
// Nodemailer ignores the bad `from` value (not a valid email)
// Nodemailer sends with from ==''
// This gets bounced by google group addresses
var msg = {
from: "System",
to: "usergroupaddress#gmail.com,
subject: "Your generated email",
text: "Hello user",
html: "<p>Hello user</p>"
};
I had thought 'from' would define the name displayed on the email. It didn't do that, but it didn't cause any problems either for most email recipients. But google groups was bouncing those emails.
Nodemailer was just leaving 'from' as blank (rather than using my dummy string). Apparently this field must be a valid email address. Set it to an email address, and nodemailer will include it in the message envelope, which google groups will then stop bouncing.
// Nodemailer accepts and forwards the valid `from`
// google groups address will accept the email
var msg = {
from: "system#myserver.com",
to: "usergroupaddress#gmail.com,
subject: "Your generated email",
text: "Hello user",
html: "<p>Hello user</p>"
};
The google apps email also hints at this: emails with an empty 'from' envelope have a blank 'sender' in the google apps email log search. But as soon as I corrected nodemailer, the 'sender' started populating in email log search, and google stopped bouncing the emails. See the email log here.
How do we mention the conversation id in the botframework webchat instead of it being randomly generated? We can currently mention the userid and username for the webchat but could not have the conversation id mentioned.
For more information on this subject, check out the guide: Send proactive messages.
To be able to send an ad hoc message to a user, the bot must first collect and save information about the user from the current conversation. The address property of the message includes all of the information that the bot will need to send an ad hoc message to the user later.
bot.dialog('/', function(session, args) {
var savedAddress = session.message.address;
// (Save this information somewhere that it can be accessed later, such as in a database.)
var message = 'Hello user, good to meet you! I now know your address and can send you notifications in the future.';
session.send(message);
});
After the bot has collected information about the user, it can send an ad hoc proactive message to the user at any time. To do so, it simply retrieves the user data that it stored previously, constructs the message, and sends it.
function sendProactiveMessage(address) {
var msg = new builder.Message().address(address);
msg.text('Hello, this is a notification');
msg.textLocale('en-US');
bot.send(msg);
}