Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to sendgrid v.3.2 #6

Open
robregonm opened this issue Aug 4, 2015 · 6 comments
Open

Upgrade to sendgrid v.3.2 #6

robregonm opened this issue Aug 4, 2015 · 6 comments

Comments

@robregonm
Copy link

It would be great to use the new API features (version 3.2.0).
https://github.com/sendgrid/sendgrid-php
The one I'd like to have into this extension is: Send emails using the API key.

@bryglen
Copy link
Owner

bryglen commented Aug 5, 2015

what's new in Version 3.2?

@bryglen
Copy link
Owner

bryglen commented Aug 5, 2015

I've checked the code there is some breaking changes if I updated it to 3.2. I will try to do it on a weekend

@igmilano
Copy link

Is CC working?
I can send the mail to multiple recipients but i need them in CC for forwarding.
Couldn´t found a workaround

@bryglen
Copy link
Owner

bryglen commented Aug 14, 2015

@igmilano
Copy link

Yes, I read the whole sendgrid documentation but I`m curently using your Yii2-sendgrid wrapper.
When I call setCcs() method, I get "Calling unknown method: bryglen\sendgrid\Message::setCcs()"

My code is

$sendGrid = Yii::$app->sendGrid;
$mail = $sendGrid->compose( 'new', [
'data' => $data,
'logo' => '../mail/images/logo.png'
] );
$mail->setFrom( [ Yii::$app->params[ "adminEmail" ] => Yii::$app->params[ "title" ] ] );
$mail->setTo("[email protected]");
$mail->setCcs($emails);
$mail->setSubject( "$message" )->send( $sendGrid );

@igmilano
Copy link

For example, I tried out with your example on "how to use it" and:

$sendGrid = Yii::$app->sendGrid;
$message = $sendGrid->compose('contact/html', ['contactForm' => $form])
$message->setFrom('[email protected]')
->setTo("[email protected]")
->setSubject("subject")
->send($sendGrid);

works perfect but

$sendGrid = Yii::$app->sendGrid;
$message = $sendGrid->compose('contact/html', ['contactForm' => $form])
$message->setFrom('[email protected]')
->setTo("[email protected]")
->setCc("[email protected]")
->setSubject("subject")
->send($sendGrid);

dont

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants