I'm facing one problem while sending emails with SendGrid. I'm sending normal email with assigning unsubscribe ground id. And when sending email then getting two links Unsubscribe From This List
and Manage Email Preferences
. Now my requirement is that I want to change these link texts from
- Unsubscribe From This List => Unsubscribe
- Manage Email Preferences => Update Preferences
And also links are not coming in the bottom of email. I want these after footer texts.
I'm not using marketing emails. Below is the one email screen-shot which I got:-
And below is the code for sending email. I'm using Laravel for sending emails:-
public function sendMail()
{
$status = \Mail::send('emails.demo', ['name' => "testdata"], function($message)
{
$args = [
'asm_group_id' => 3169
];
$message->getHeaders()->addTextHeader('X-SMTPAPI', json_encode($args));
$message->to('[email protected]', 'Test User')->subject('This is a demo!');
});
}
Please suggest me if anyone have idea how can I achieve this.
Check this package. https://github.com/s-ichikawa/laravel-sendgrid-driver .
This is the correct format for the above package:
if you are not using this package then