You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
->setSubject('Email from CakePHP SendGrid plugin')
77
-
->send('Message from CakePHP SendGrid plugin');
77
+
->deliver('Message from CakePHP SendGrid plugin');
78
78
```
79
79
80
80
That is it.
81
81
82
82
## Advance Use
83
-
You can also use few more options to send email via SendGrid APIs. To do so, get the transport instance and call the appropriate methods before sending the email.
83
+
You can also use few more options to send email via SendGrid APIs. To do so, just call the appropriate methods before sending the email.
84
84
85
85
### Custom Headers
86
86
You can pass your own headers. It must be prefixed with "X-". Use the default `Email::setHeaders` method like,
->setSubject('Email from CakePHP SendGrid plugin')
121
-
->send('Message from CakePHP SendGrid plugin');
115
+
->deliver('Message from CakePHP SendGrid plugin');
122
116
```
123
117
124
118
> To send inline attachment, use `contentId` parameter while setting attachment.
@@ -128,20 +122,20 @@ You can use the template created in SendGrid backend. Get the template id by eit
128
122
Set the template id using `setTemplate` method.
129
123
130
124
```php
131
-
$email = new Email('sendgrid');
132
-
$emailInstance = $email->getTransport();
133
-
$emailInstance->setTemplte(123);
134
-
$email->send();
125
+
$email = new SendGridMailer();
126
+
$email->setTo('foo@example.com.com')
127
+
->setTemplate('d-xxxxxx')
128
+
->deliver();
135
129
```
136
130
137
131
### Schedule
138
-
You can schedule the email to be sent in future date. You can set upto 72 hours in future as per SendGrid documentation.
132
+
You can schedule the email to be sent in future date. You can set upto 72 hours in future as per SendGrid documentation. You need to pass a unix timestamp value.
0 commit comments