Can I stop a SendGrid mail if it received a certain parameter? - sendgrid

I'm using a certain SendGrid template for several different projects and am trying to find a way to stop emails from going out in some conditions, through SendGrid.
For example, lets say I'm passing SendGrid some parameters like:
{id, name, amount, date}
I want to stop that email from going out when i'm passing a certain id.
I know that I can change the email template i'm sending with conditionals using handlebars:
From here
But Can I actually stop the mail if some condition happens?
In my case, every time I send the id = 5

You can control the body of the email using Handlebar templating, but by that point, you have already told SendGrid to send email with the data you provided. You cannot stop the email from being sent from within Handlebars.
If you're using code to tell SendGrid to send these emails, you could check in your code if the id equals 5, and if so, do not send an email.
If you're using Single Sends to send an email to SendGrid Contacts, you could to store this id field as a custom field, and create a segment or update your existing segment to filter out the contact with that id.

Related

Docusign for Salesforce integration assistance

In the last days, I have started to integrate DocuSign for SalesForce, and I have some questions and issues :
Can one define ahead and anchor the location for signature and other fields that the customer has to fill? So that our sales reps won't have to go through each document and plant the fields in the envelope, and instead it would be immediately ready to send?
Is it possible to define default Email sender as a Queue email/Department Email, and not the user email? Also, can the final email with the signed document be sent to the queue email?
Can I define the subject and the body of the email on Hebrew (it's a right to left language!)
Can I use in the email subject and body dynamic parameters from SF objects? Like from the opportunity or the account.
I did some tests, but the signed document doesn't show in the Document status section in the opportunity. What might be the reason for it?
Yes you can, you can set up a template with predefined tabs or anchor text depending on how you are using DocuSign here is the how-to: https://support.docusign.com/en/guides/ndse-user-guide-working-with-templates
That email address would need an account, personally I would not set it up that way, if the end goal is to get a copy of the final doc to that mail queue I would add that email address as a recipient (gets a copy)
you can set up custom languages for each recipient: start a new envelope, add recipients, in the Message to All Recipients, select Custom email and language for each recipient.here is the how to:https://support.docusign.com/en/guides/ndse-user-guide-recipient-language
Yes, custom buttons in Salesforce allow you to dynamically define the Subject and Email Message of an envelope using any field in the Salesforce object.
It sounds like your Connect for Salesforce may not be authenticated, look and see if it is for just one envelope or for all, perhaps disconnect and reconnect. DocuSign had a support article on this: https://support.docusign.com/articles/Why-aren-t-my-completed-envelopes-being-shown-in-Salesforce

Prestashop: send a 2nd confirmation email to a 2nd email address

I need to add an option in Prestashop(for instance by ticking a box) to send the confirmation order email to another email address, if it's a gift for instance.
I added an email field to my addresses table and forms, but I do not know how to get that value afterward and send the confirmation to the email input there, I tried adding a send::mail in PaymentModule.php, without success.
Do you have in workaround this problem ?
You can refer the validateOrder() function in PaymentModule.php classes as this function is responsible for creating the order and sending order confirmation email as well.

How to track status of email in sendgrid without using SMTP.

I want to send emails which contain different contents to same user and I need to track their status. Are there any way to do that without using SMTP.
Sounds like you want Unique Args. These are called custom_args in the v3 API mail send argument, but it's the same concept.
Once you activate the Event Webhook, all events will include the appropriate unique_args, so you can relate each specific message to each.
Also, whenever you send a message to SendGrid, the acceptange response includes a message_id, which will be in all those events.

How to send bulk emails with different subjects using Mandrill API?

How am I supposed to do to send bulk emails with dynamics subjects?
For example, If I need to send 200 emails at once, I don't want to call the Mandrill send() method 200 times because I suppose it's a very bad practice.
I'd want to call the send() method 1 time, putting my 200 recipients in the to attribute (this works well). However, in that case, how to set a different mail subject for each mail sent?
Thanks.
You can use merge tags within your subject to change the subject line for each user.
http://help.mandrill.com/entries/28499087-Can-I-use-merge-tags-in-my-subject-line-or-other-headers-
You can provide a default value for your merge tag and/or for each/some users personalised data.
Given the anatomy of an e-mail in Mandril is based upon subject and body (or template) to define a unique entity what you are asking to do isn't possible. A different subject or body constitutes a different e-mail and requires it's own .send().
If the same e-mail (same subject and body/template) was being sent to all receipts then a single .send() would work.

For non-customized bulk email, is it better to use the BCC field, or generate a separate email with To header for each recipient?

I'm generating a bulk mailing each day for users who want to receive the daily deals. I can either send a separate physical email with each user specified on their own unique To header, or I can send one email with all the users on the BCC line.
Obviously if I ever want to create user specific content I will need to customize the emails per user and send them individually, but if I don't want customized email right now, should I just send out the single email with everyone on BCC? Any reason to NOT do that.
Edit: I'm using a third party as my gateway that specializes in delivery with CAN-SPAM compliance, etc.. not trying to do this off my own mail server...
Update: I guess I'm really also looking for some metrics here. Is there a difference in open rates of BCC'ed email vs To field email? What about spam filtering rules that might pre-classify based on the BCC field?
No reason I can think off for NOT doing it. Using BCC is the polite way to send bulk emails.
In this case, it turns out that the correct answer was neither. The gateway provided a custom header API that allowed me to specify all the recipients in a secondary "To" field. The API then handled the blind delivery of the emails, and also did variable substitution for me so I didn't have to transmit all the duplicate content multiple times. The API then handled doing "best practices delivery of the email".