weblee / mandrill Goto Github PK
View Code? Open in Web Editor NEWMandrill Laravel 5 Package
License: MIT License
Mandrill Laravel 5 Package
License: MIT License
I want to save email content and its data in DB after send.
As Mandrill is shutting down its services on 11th Jan 2020 and we are using its API via this Library, Therefore we have to save all email data in DB and it will be reprocessed after there service comes back to normal state.
We need to override this function sendTemplate of class Mandrill_Messages to get data saved in DB, This will be the shortest hack that we can do as we are calling Via the Facade.
MandrillMail::messages()->sendTemplate("cng-forgot-password", $content, $message);
What will be the correct way to do this in Laravel 5.2?
help me, im using Laravel 5, but the email didnt sent to destination.
when i print $result[0]["reject_reason"] the result is invalid-senderNULL,
can you help me??
if im using mandrill for sendmail without this class, its work. but i need your class to using mandrill template but the email didnt sent. because the invalid sender.
here is my code.
`namespace App\Services;
use Weblee\Mandrill\Mail;
class WebleeMail{
private function welcomeEmail($userEmail,$userName){
try{
$template_name = 'forgot_password';
$template_content = array(
array(
'name' => 'test',
'content' => 'test'
)
);
$message = array(
'to' => array(
array(
'email' => $userEmail,
'name' => $userName,
'type' => 'to'
)
)
);
$result = \MandrillMail::messages()->sendTemplate($template_name, $template_content, $message);
if($result[0]["status"]=="sent" AND !$result[0]["reject_reason"]){
return true;
}
else{
return $result[0]["reject_reason"];
}
}
catch(Exeption $e){
return false;
}
}
public function testEmail(){
echo $this->welcomeEmail("[email protected]","test");
}
}`
Thanks for your work on this wrapper. We've been using it all over the place and it's been perfect.
Is there a way / how would the syntax change if I were instantiating Mandrill with a dynamic API key? It's for a multi-tenant app and I'm wondering if I maybe need to skip this package and interact directly with Mandrill?
Thank you again!
Matt
Any idea why this would be happening? Sending via Facade with the code
\MandrillMail::message()->sendTemplate($template_name, $template_content, $message);
Hi,
i installed weblee/mandrill like described in readme.md. if i want to send a mail by facade, i just get the error - Class 'MandrillMail' not found.
i use Laravel 5.2
My controller looks like this:
Hello,
I used this template without errors until today. But now I am getting this error. Also my other templates working normally. Do you have any idea?
Thanks.
I am getting this error:
Mandrill_HttpError in Mandrill.php line 126:
API call to messages/send-template failed: Could not resolve host: mandrillapp.com
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.