how to send mail in cake php using phpmailer libraray

2016-01-29 Thread Jagdish singh bisht
hi,  just want to know how to send email using phpmailer library  in 
cakephp 3.0.15

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Send mail problem

2014-04-27 Thread ZKen
Hi Guys, 

Nice to know this forum. I am new on cake php. I have the problem for 
sending email. My scenario: 
1. User register at my site and will receive the thank you for register 
email. This is worked 
2. User subcriber to my site and also will receive the thank you for 
subscribe mail ( this email never received) by subcriber user. 

Can you guys expert here, help me for this :) 

Regards, 
Zee

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to send mail from cakephp to CentOs (Postfic/DovCot).

2013-06-17 Thread Eric Haskins
Is this on a server under your control or Shared Hosting 
(hostgator,DirectNic, etc)  

Cake shouldnt be blocking or stopping you unless there is a memory issue 
due to how many records.  I would look at your hosting setup some hosts 
have implemented hourly limits etc.  

I have my hosting customers set to default of no more than 1000 emails an 
hour.

Eric  


On Thursday, June 13, 2013 5:28:17 AM UTC-4, Snehal Savaliya wrote:
>
> Hello,
>
> I am trying to send mail from cakephp site to CentOs (Postfic/DovCot).
> But I can able to only send that mail to 950 users.
> but above that I can not able to send.
>
> Is there any limit to send mail.
> I also try to increase/Decrease mail content size. but still the same 
> problem.
>
> Help me Please.
>
> Thank you.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Unable to send mail from cakephp to CentOs (Postfic/DovCot).

2013-06-14 Thread Snehal Savaliya
Hello,

I am trying to send mail from cakephp site to CentOs (Postfic/DovCot).
But I can able to only send that mail to 950 users.
but above that I can not able to send.

Is there any limit to send mail.
I also try to increase/Decrease mail content size. but still the same 
problem.

Help me Please.

Thank you.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Send mail smtp

2009-09-07 Thread ruchika

 i tried using smtp with port 465 and host ssl://smtp.gmail.com its
not giving any error but not sending the email.what cud be the
problem ?can anyone suggest?

On Sep 5, 9:35 pm, "euromark (munich)" 
wrote:
> i had another problem withsmtpand the email component
> is this a bug? or a problem on freenet.de?
>
> "
> Hi. This is the qmail-send program at mail.gmx.net.
> I'm afraid I wasn't able to deliver your message to the following
> addresses.
> This is a permanent error; I've given up. Sorry it didn't work out.
>
> :
> 195.4.92.212_failed_after_I_sent_the_message./
> Remote_host_said:_550_Syntax_error_in_header/
>
> --- Below this line is a copy of the message.
> ...
> "
>
> it only happens with this domain
> all other user mails got transmitted
> any ideas why the headers could be messed up for this mail service?
>
> thx
>
> On 5 Sep., 16:32, brian  wrote:
>
>
>
> > This isn't a Cake issue, it's DNS. Search google for that error and
> > you'll find some information about it (that's about all I can tell you
> > about it).
>
> > But it may be simply that you have a typo: "smpt.1und1.de" should
> > probably be "smtp.1und1.de".
>
> > On Fri, Sep 4, 2009 at 7:03 PM, Benedikt R. wrote:
>
> > > Hi!
>
> > > I get this error:
> > > php_network_getaddresses: getaddrinfo failed: nodename nor servname
> > > provided, or not known: 0
>
> > > This is my controller action:
>
> > > function register( ) {
> > >        if ( !empty($this->data) ) {
> > >                $this->Email->smtpOptions = array(
> > >                        'port' => '25',
> > >                        'timeout' => '30',
> > >                        'host' => 'smpt.1und1.de',
> > >                        'username' => 'u...@domain.de',
> > >                        'password' => '#'
> > >                );
>
> > >                $this->Email->sendAs = 'text';
> > >                $this->Email->delivery = 'smtp';
> > >                $this->Email->from = 'u...@domain.de';
> > >                $this->Email->to = 'u...@domain.de';
> > >                $this->Email->subject = 'User Registration';
> > >                $this->Email->send('Hello!');
> > >                $this->Session->setFlash('Message body!');
>
> > >                $this->set('smtp_errors', $this->Email->smtpError);
> > >        }
> > > }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Send mail smtp

2009-09-05 Thread euromark (munich)

i had another problem with smtp and the email component
is this a bug? or a problem on freenet.de?

"
Hi. This is the qmail-send program at mail.gmx.net.
I'm afraid I wasn't able to deliver your message to the following
addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

:
195.4.92.212_failed_after_I_sent_the_message./
Remote_host_said:_550_Syntax_error_in_header/

--- Below this line is a copy of the message.
...
"

it only happens with this domain
all other user mails got transmitted
any ideas why the headers could be messed up for this mail service?

thx


On 5 Sep., 16:32, brian  wrote:
> This isn't a Cake issue, it's DNS. Search google for that error and
> you'll find some information about it (that's about all I can tell you
> about it).
>
> But it may be simply that you have a typo: "smpt.1und1.de" should
> probably be "smtp.1und1.de".
>
> On Fri, Sep 4, 2009 at 7:03 PM, Benedikt R. wrote:
>
> > Hi!
>
> > I get this error:
> > php_network_getaddresses: getaddrinfo failed: nodename nor servname
> > provided, or not known: 0
>
> > This is my controller action:
>
> > function register( ) {
> >        if ( !empty($this->data) ) {
> >                $this->Email->smtpOptions = array(
> >                        'port' => '25',
> >                        'timeout' => '30',
> >                        'host' => 'smpt.1und1.de',
> >                        'username' => 'u...@domain.de',
> >                        'password' => '#'
> >                );
>
> >                $this->Email->sendAs = 'text';
> >                $this->Email->delivery = 'smtp';
> >                $this->Email->from = 'u...@domain.de';
> >                $this->Email->to = 'u...@domain.de';
> >                $this->Email->subject = 'User Registration';
> >                $this->Email->send('Hello!');
> >                $this->Session->setFlash('Message body!');
>
> >                $this->set('smtp_errors', $this->Email->smtpError);
> >        }
> > }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Send mail smtp

2009-09-05 Thread brian

This isn't a Cake issue, it's DNS. Search google for that error and
you'll find some information about it (that's about all I can tell you
about it).

But it may be simply that you have a typo: "smpt.1und1.de" should
probably be "smtp.1und1.de".

On Fri, Sep 4, 2009 at 7:03 PM, Benedikt R. wrote:
>
> Hi!
>
> I get this error:
> php_network_getaddresses: getaddrinfo failed: nodename nor servname
> provided, or not known: 0
>
> This is my controller action:
>
> function register( ) {
>        if ( !empty($this->data) ) {
>                $this->Email->smtpOptions = array(
>                        'port' => '25',
>                        'timeout' => '30',
>                        'host' => 'smpt.1und1.de',
>                        'username' => 'u...@domain.de',
>                        'password' => '#'
>                );
>
>                $this->Email->sendAs = 'text';
>                $this->Email->delivery = 'smtp';
>                $this->Email->from = 'u...@domain.de';
>                $this->Email->to = 'u...@domain.de';
>                $this->Email->subject = 'User Registration';
>                $this->Email->send('Hello!');
>                $this->Session->setFlash('Message body!');
>
>                $this->set('smtp_errors', $this->Email->smtpError);
>        }
> }
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Send mail smtp

2009-09-04 Thread Benedikt R.

Hi!

I get this error:
php_network_getaddresses: getaddrinfo failed: nodename nor servname
provided, or not known: 0

This is my controller action:

function register( ) {
if ( !empty($this->data) ) {
$this->Email->smtpOptions = array(
'port' => '25',
'timeout' => '30',
'host' => 'smpt.1und1.de',
'username' => 'u...@domain.de',
'password' => '#'
);

$this->Email->sendAs = 'text';
$this->Email->delivery = 'smtp';
$this->Email->from = 'u...@domain.de';
$this->Email->to = 'u...@domain.de';
$this->Email->subject = 'User Registration';
$this->Email->send('Hello!');
$this->Session->setFlash('Message body!');

$this->set('smtp_errors', $this->Email->smtpError);
}
}

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: send mail

2008-09-03 Thread Ranju

sorry

On Sep 4, 4:00 am, "Gonzalo Servat" <[EMAIL PROTECTED]> wrote:
> On Wed, Sep 3, 2008 at 7:32 PM, Wayne Fay <[EMAIL PROTECTED]> wrote:
>
> > Google for "cakephp email send" for numerous examples. Emailing the
> > group for this is just pure laziness.
>
> This is like the 5th or 6th email Ranju has sent clearly showing he is here
> to waste everyone's time. He even emailed me directly to ask me for "Forgot
> Password" code! I think it's probably a good idea to ignore his emails
> requesting someone else to do his work and only reply to the ones that have
> specific questions whose answers are not easily found on public resources.
>
> - Gonzalo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: send mail

2008-09-03 Thread Ranju

sorry

On Sep 4, 3:32 am, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> Google for "cakephp email send" for numerous examples. Emailing the
> group for this is just pure laziness.
>
> On Wed, Sep 3, 2008 at 2:19 PM, Ranju <[EMAIL PROTECTED]> wrote:
>
> > I want send email with cakephp.pls help me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: send mail

2008-09-03 Thread Wayne Fay

> Password" code! I think it's probably a good idea to ignore his emails
> requesting someone else to do his work and only reply to the ones that have
> specific questions whose answers are not easily found on public resources.

Fair enough -- Gmail showed him as "Ranjana" for the first 5 or 6, and
then this one showed as "Ranju" so I didn't realize it was the same
(exceedingly lazy) person...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: send mail

2008-09-03 Thread Gonzalo Servat
On Wed, Sep 3, 2008 at 7:32 PM, Wayne Fay <[EMAIL PROTECTED]> wrote:

>
> Google for "cakephp email send" for numerous examples. Emailing the
> group for this is just pure laziness.
>

This is like the 5th or 6th email Ranju has sent clearly showing he is here
to waste everyone's time. He even emailed me directly to ask me for "Forgot
Password" code! I think it's probably a good idea to ignore his emails
requesting someone else to do his work and only reply to the ones that have
specific questions whose answers are not easily found on public resources.

- Gonzalo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: send mail

2008-09-03 Thread Wayne Fay

Google for "cakephp email send" for numerous examples. Emailing the
group for this is just pure laziness.

On Wed, Sep 3, 2008 at 2:19 PM, Ranju <[EMAIL PROTECTED]> wrote:
>
> I want send email with cakephp.pls help me.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



send mail

2008-09-03 Thread Ranju

I want send email with cakephp.pls help me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: temporarily change locale to send mail?

2008-05-24 Thread b logica

I got this to work by changing the language in the MembersController
before calling the requestAction for Users. I guess it didn't work
before because requestAction is kind of special. However, though I'm
resetting the language back to the original right after that, the view
presented to the browser also switches to the user's preferred
language.

I then tried putting the logic in MembersController beforeFilter() &
afterFilter() with the same result. So, I moved the afterFilter logic
to beforeRender(). Again, the email uses the proper locale but causes
the view to switch as well.

In any case, putting the logic in this controller is far from ideal
because I'd need to do the same in several others.

I'm pretty much out of ideas but I can't believe that this is impossible.

On Sat, May 24, 2008 at 11:01 PM, b logica <[EMAIL PROTECTED]> wrote:
> My Users controller sends out an email with a login & password when an
> admin enables a member, who can specify a language of choice for
> communications. Thus, I'd like to be able to switch the locale,
> regardless of whatever the admin is using, just for this email.
> Actually, there are several places I'd like to do this, but let's take
> the password msg as an example.
>
> The way it works is the MembersController::admin_[add||edit]() will
> call Users::add() through a requestAction, passing the params that are
> required. In case you're wondering, I need to do it this way because I
> have several types of "members", all of which need their own
> models/controllers, so roles for one model are out. All of these
> "members" require an entry in the users table in order to log in.
>
> I'm using a SwiftMailer component, modified from the one posted at the
> bakery to work with the 1.2.x branch. It renders the views pretty much
> the same as the built-in EmailComponent:
> -- snip --
> $old_layout = $this->controller->layout;
> $this->controller->layout = '';
> ob_start();
> echo $this->controller->render(null, null, $view);
> $plain_msg = strip_tags(ob_get_clean());
> $this->controller->layout = $old_layout;
> -- snip --
>
> After studying the L10N & i18n classes, it seems that all i need to do
> is the following in the controller:
> -- snip --
> Configure::write('Config.language', $this->params['language']);
> $this->SwiftMailer->applyView($view);
> $this->SwiftMailer->send();
>
> /* $this->lang is set in AppController, btw
>  */
> Configure::write('Config.language', $this->lang);
> -- snip --
>
> Contents of the view:
> 
>
> To make a long story short, this ain't working for me. I also tried
> setting $language & $old_language in the controller and wrapping the
> sprintf() with:
>
> Configure::write('Config.language', $language);
> ...
> Configure::write('Config.language', $old_language);
>
> I knew it wouldn't work, but hey.
>
> I also tried this in the users controller:
>
> function beforeFilter()
> {
>parent::beforeFilter();
>
>if ($this->params['action'] == 'add')
>{
>Configure::write('Config.language', $this->params['language']);
>}
> }
>
> function afterFilter()
> {
>if ($this->params['action'] == 'add')
>{
>Configure::write('Config.language', $this->lang);
>}
>
>/* OT QUESTION: should I put the following before, or after, my own 
> logic?
> */
>parent::afterFilter();
> }
>
> which I figured would *have* to work, but no dice. Old-timers will be
> happy to know that I tried this after asking in this mail if it would
> work and then realising that I could damn well just go try it for
> myself
>
> So, does anyone have any insight into this? This is one of the last
> hurdles to getting this site completely multilingual. I guess the next
> thing I could try is passing the language to the SwiftMailer
> component, though I'm doubtful that would make any difference,
> considering what hasn't worked so far. Also, I'd prefer to keep that
> component language-agnostic, as all it needs to know is which view(s)
> to use.
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



temporarily change locale to send mail?

2008-05-24 Thread b logica

My Users controller sends out an email with a login & password when an
admin enables a member, who can specify a language of choice for
communications. Thus, I'd like to be able to switch the locale,
regardless of whatever the admin is using, just for this email.
Actually, there are several places I'd like to do this, but let's take
the password msg as an example.

The way it works is the MembersController::admin_[add||edit]() will
call Users::add() through a requestAction, passing the params that are
required. In case you're wondering, I need to do it this way because I
have several types of "members", all of which need their own
models/controllers, so roles for one model are out. All of these
"members" require an entry in the users table in order to log in.

I'm using a SwiftMailer component, modified from the one posted at the
bakery to work with the 1.2.x branch. It renders the views pretty much
the same as the built-in EmailComponent:
-- snip --
$old_layout = $this->controller->layout;
$this->controller->layout = '';
ob_start();
echo $this->controller->render(null, null, $view);
$plain_msg = strip_tags(ob_get_clean());
$this->controller->layout = $old_layout;
-- snip --

After studying the L10N & i18n classes, it seems that all i need to do
is the following in the controller:
-- snip --
Configure::write('Config.language', $this->params['language']);
$this->SwiftMailer->applyView($view);
$this->SwiftMailer->send();

/* $this->lang is set in AppController, btw
 */
Configure::write('Config.language', $this->lang);
-- snip --

Contents of the view:


To make a long story short, this ain't working for me. I also tried
setting $language & $old_language in the controller and wrapping the
sprintf() with:

Configure::write('Config.language', $language);
...
Configure::write('Config.language', $old_language);

I knew it wouldn't work, but hey.

I also tried this in the users controller:

function beforeFilter()
{
parent::beforeFilter();

if ($this->params['action'] == 'add')
{
Configure::write('Config.language', $this->params['language']);
}
}

function afterFilter()
{
if ($this->params['action'] == 'add')
{
Configure::write('Config.language', $this->lang);
}

/* OT QUESTION: should I put the following before, or after, my own 
logic?
 */
parent::afterFilter();
}

which I figured would *have* to work, but no dice. Old-timers will be
happy to know that I tried this after asking in this mail if it would
work and then realising that I could damn well just go try it for
myself

So, does anyone have any insight into this? This is one of the last
hurdles to getting this site completely multilingual. I guess the next
thing I could try is passing the language to the SwiftMailer
component, though I'm doubtful that would make any difference,
considering what hasn't worked so far. Also, I'd prefer to keep that
component language-agnostic, as all it needs to know is which view(s)
to use.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---