Change email username in email sent by Sendgrid - email

I created a sendgrid plugin inside strapi enviorment.
I need to change the defaukt email sending user name into another one
eg: defaultEmail : test123#gmail.com
Once the sendgrid send the email to user it should receive the username as
Team Test
But it receiving test123.
I changes the username from gmail setting also but it did not change

To set the from name of an email sent from SendGrid you need to pass the name and email address to the API as an object.
For example:
const sg = require("#sendgrid/mail");
const message = {
from: {
email: "test123#gmail.com",
name: "Team Test"
},
...otherEmailOptions
};
sg.setApiKey(process.env.SENDGRID_API_KEY);
sg.send(message);
Note that your Gmail settings will not affect any emails you send using SendGrid. When you send an email through SendGrid, it is sent independently of any other service or servers on which you can send email with that address.

Related

SAP BW SMTP unique sender

I've configured SMTP on BW4HANA.
Everything works correctly only if the user that send the email have a certain email setted in SU01 (Example: testemail#test.com), if an user, with a personal email setted in SU01, try to send an email receive an error like "...not authorized to send as...".
What i want is that every user have their own personal email setted in SU01 but when they send an email this will be send using testemail#test.com. Basically i want that every email will be send with testemail#test.com address even if the user that send the email have another email setted in SU01. it's possible ? how ? can the parameter SMTP_TECH_SENDER help in this ?

Configuring POP3 with Sendgrid - Can't receive emails but can send them

All I have is an email client (emClient) and a working sendgrid account. When prompted to enter an email address, I can happily put anything#mydomain.com and it will confirm that it works with SMTP. I can also send emails using this client. I authenticate with the username apikey and my api key.
However, these emails are permanently stuck in the "outbox" and are constantly sent over and over again, presumably because the client has no confirmation that they were sent. When trying to set up a new account under this domain, I setup my "incoming server" as smtp.sendgrid.net and provide my credentials and it sort-of works (after prompting me for my authentication?).
As you can see, SMTP authenticates just fine and this makes sense as I am seemingly able to send email. However, both IMAP and POP3 when I select them in the "incoming server" are stuck on this "testing" stage until they fail.
Now, if we skip ahead to me sending something out - basically, it works. I receive the email on the destination, it does not get marked as spam and it comes from my domain and my name.
However, when I attempt to receive an email on the anything#mydomain.com one, it just doesn't do anything. I don't get an error from gmail that it wasn't delivered, it simply just doesn't get delivered.
For my domain settings, I have the following configured:
Twilio SendGrid developer evangelist here.
While SendGrid allows you to send emails over SMTP or via the API, SendGrid is not a full mailbox that you can connect to over POP3 or IMAP. You cannot connect to SendGrid using an email client, that is not what it is intended for. SendGrid is not a mailbox, but a way to programmatically send and receive emails and other email based events.
The way to receive incoming emails is via the inbound parse webhook. When you have set that up, incoming emails to your configured domain will cause a webhook, an HTTP request, to be sent to a URL you configured, with all the information about the email.

Verify users email

When a user sets up an account for an application and uses their email address for a username, how do I verify that the email address they entered is a valid email? Specifically, without sending a verification email.
Valid e-mail address eq php filter_var('root#stackoverflow.com', FILTER_VALIDATE_EMAIL);
when user finish retyping e-mail onfocus send ajax request
DNS query for e-mail svr eq search in google for source script "valid email by dns github"

How can I hide the 'to' field in the email sent by php mail

I am using php mail function to allow user to send me a mail from
website.
I am also allowing them to "cc" the email to themselves.
The whole purpose of making a "send us message" feature was not give our email to the users. But when the user selects the "cc" option, in the header of the mail that is sent to the user, the "to" field contains our primary email address.
How can I remove this, so that the users do not see our primary email address in the to field.
You could set the mailTo to an arbitrary mailbox at your domain "noreply#yourdomain.com" and add your company address in BCC?
But whatever reason you have for not exposing your email, imho it's quite unpolite :)
The e-mail message sent to you must have a To: field to be delivered correctly. You could emulate the CC feature by sending to separate e-mail messages to the office and to the client.

MailApp.sendEmail method doesn't get through to accounts with URL in the body - Message Blocked

I am working on Google Apps Script. I am trying to send email as follows:
function test_sendmail(){
var subject = "subject";
var body = "https://www.google.com/";
var emailBody = body;
var options = {
htmlBody: body
}
var recipient = "XXXXXXXXX#gmail.com";
MailApp.sendEmail(recipient, subject, emailBody, options);
}
"XXXXXXXXX#gmail.com"(email address A) is not valid, but it's only for showing you an example. I use a real email address in the GAS execution.
The GAS execution is run by another G-suite domain google account(email address B) by which account the code is written.
The email address A has editing rights to the spreadsheet that has the above code in the GAS editor.
But, the email from the above function doesn't get through the email address A. I got this email in the email address B.
LEARN MORE:
https://support.google.com/mail/answer/6596?visit_id=637267406328019079-2003975007&rd=1
Then, I replace the email address with the email address B. and I tried to send it, and it did get through successfully.
Secondly, I changed the URL part:
var body = "https://www.google.com/";
to:
var body = "";
Then, the email successfully get through to both email addresses A and B.
The results listed as below:
The failure of sending email with URL to email address like the email address A has occurred recently like from 1 week or 2 weeks ago. Until then, the 4 cases had been successfully done before. I have no idea why this started happening recently.
I checked if the sender email address B is in the contact list of the recipient email address A.
It is not in my contacts.
But when I searched it, it appeared, so it seems in all contacts.
Added 1:
I tried sending email to the email address C which is another G-suite mail address in the same domain as the email address B, but email address C doesn't have rights to the spreadsheet and the editor.
It sent to the email C successfully even it has no right to the spreadsheet.
Added 2:
I tried sending email to the email address D which is other email address that is neither G-suite domain or #google.com address. The result is the same as the email address A.
Gmail anti-spam algorithms are complex. To prevent that the messages sent by your script being blocked by them, follow the guidelines on Prevent mail to Gmail users from being blocked or sent to spam
Possible Workaround
One of my clients had the same issue, I replaced MailApp.sendEmail(message) by GmailApp.sendEmail(recipient,subject,body,options) apparently this worked (No bounce messages after 10 minutes)
Rafa Guillermo added in a comment:
Just want to add that in this case if this is an ongoing issue you should get your admin to contact G Suite support
If you hasn't access to G Suite Support I think that you could report this issue to Google by using Google Feedback (Open Gmail web UI > click the settings button (gear icon) > Send feedback)
Related
MailApp.sendEmail() in Google Apps Script not sending email (it looks that this is first Q/A about this issue that also suggest replace MailApp by GmailApp)
Message blocked when sending email from Google Script