Questions tagged [cakeemail]

CakeEmail is a CakePHP class to send email. With this class one can send email from any place in your application. In addition to using the EmailComponent from your controller, you can also send mail from Shells and Models.

Official Document

Basic Usage:

$Email = new CakeEmail();
$Email->from(array('me@example.com' => 'My Site'))
    ->to('you@example.com')
    ->subject('About')
    ->send('My message');
30 questions
5
votes
2 answers

CakePHP : Send email to multiple addresses

I want to send an email with CakeEmail to multiple addresses (email address of the people who sign up in my website). Here is my code I use : public function send($d){ $this->set($d); if($this->validates()){ …
rohidjetha
  • 63
  • 1
  • 1
  • 6
2
votes
1 answer

CakeEmail is erroneously reporting that a template is missing when using themes

I have a controller QuickContacts with an action add() which uses CakeEmail to send a message, like so: $Email = new CakeEmail(); $Email->from(array('noreply@xyz' => 'xyz')); $Email->to(($this->isBranded) ?…
user1658296
  • 1,398
  • 2
  • 18
  • 46
1
vote
1 answer

Sending Email Via CakePHP - Configuration email override the sender email

I am having problem on sending email via cake php 2.7. Well, the email gets forwarded to the desired email address but there is problem in getting sender email address, as I am getting configuration email address in the place of sender email…
nirazlatu
  • 983
  • 8
  • 18
1
vote
1 answer

Substitute variables of a template body email from database by specific information in CakePHP

Imagine this scenario, I have a table called "message_templates" with the following structure:- id subject body where the body value is:-

ID: ${PROJECT_ID}

Project's Title: ${PROJECT_TITLE}

What is the best way to substitute theses…
1
vote
0 answers

Log Emails Sent to DB

Is it possible to log emails sent using CakeEmail using the new (2.1+) Events system? I'm hoping I can do something like this, only what I have doesn't do anything yet: // config/bootstrap.php App::uses('CakeEmailRecord',…
Will
  • 4,498
  • 2
  • 38
  • 65
1
vote
1 answer

Invalid email: "Array" CakePhp CakeEmail

Sorry before, i have a function add answer for answering question in my article, so when user add answer for a question, system will sending an email to user who wrote this question. This is my function in controller : public function…
dery
  • 13
  • 8
1
vote
0 answers

Increasing speed of CakeEmail?

I am wondering how to increase the speed of my contact form. CakeEmail is sending two emails when you submit your adress and is then redirecting to the next view. Any suggestions how to improve this, so the user is directly redirected and the emails…
Flojkee
  • 11
  • 1
1
vote
2 answers

CakePHP/CakeEmail - could not send EMAIL

I have function: public function contact() { $dane = $this->data; echo debug($dane); $Email = new CakeEmail(); $Email->from(array(''.$this->data['kontakt']['email'].'' => 'Strefagospodarcza.pl')) ->to('contact@mysite.pl') …
Mateusz
  • 49
  • 4
1
vote
1 answer

CakeEmail not sending, but no errors

I'm pretty new to CakePHP and this is my first attempt setting up an email form. Keeping the example simple:
Smern
  • 18,746
  • 21
  • 72
  • 90
0
votes
0 answers

CakePHP 2.4 CakeEmail ignores from() configuration

I need specify distinct senders in each sendend email with cake, but my tests are failing: $email = new CakeEmail('password'); $email ->to('destination@email.com') ->from('new@email.com',…
msolla
  • 306
  • 1
  • 3
  • 16
0
votes
1 answer

CakeEmail - Set multiple recipients

I have the next problem. I have been trying to put more than one recipient in a variable which I have set, but the mail is not triggered. I have tested this with just one recipient and it works. When I try to add one more, the email won't be sent.…
Oris Sin
  • 1,023
  • 1
  • 13
  • 33
0
votes
1 answer

override the content of cakePHP3 emails

I have built a cakePHP3 application and I'm looking for some advice concerning the following situation. An e-mail configuration is setup as follows, to send a mail whenever a new order has been created. public function orderCreated($order, array…
Laurent
  • 307
  • 3
  • 14
0
votes
1 answer

Adding Icon to Cakephp Email Subject

Please how can i add icon/ company logo to the subject line of my email so that recipients can also see my logo alongside with the subject line of my mail as being practiced by most corporate organizations. I use cakephp 3
Yomi Ojo
  • 21
  • 1
  • 3
0
votes
1 answer

CakePHP3 debigkit overwrites class association

In cakephp3 I'm using debugkit. My goal is to create a new Mailer transport class which stores the outgoing emails in a database in order to prevent it to sent out when in debug mode. I've placed my Transport class in …
JayTee
  • 3
  • 2
0
votes
1 answer

CakeEmail reformat before sending

Does anyone know if it is possible to override the message content in CakePHP CakeEmail version 2.9.1? I'm using a template to format my e-mail which is working great, but just before I send the e-mail I want to encrypt it using GNUPG. The idea…
trevrobwhite
  • 443
  • 1
  • 7
  • 22
1
2