Re: AW: [Catalyst] Sending E-Mails

2008-10-02 Thread goetz



I running Debian and installed:
apt-get install postfix dovecot-imapd dovecot-pop3d policyd-weight

in the root controller I have the methods:


sub kontakt_email : Local FormConfig {
my ( $self, $c ) = @_;
my $form = $c->stash->{form};
if ($form->submitted_and_valid) {
# Werte speichern
$c->stash->{ap} = $form->param_value('ap');
$c->stash->{nachricht} = $form->param_value('nachricht');
$c->stash->{telefon} = $form->param_value('telefon');
$c->stash->{email} = $form->param_value('email');

# E-Mail senden
my $params_href = $form->params();
$c->forward('helektra_de::Controller::Root','send_email',  
[$params_href]);

$c->stash->{template} = 'kontakt_email_ok.tt2';

} else {
# Fehler
}

}


sub send_email : Local {
my ( $self, $c ,$params_href) = @_;
$c->stash->{mail_felder} = $params_href,
$c->email(
header => [
To  => '[EMAIL PROTECTED]',
Subject => 'Kontaktformular helektra.de',

],
body => $c->view('TT')->render($c,'email.tt2'),
);

}

The code works with the built in server ..


Thanks
Götz





Am 02.10.2008 um 13:12 schrieb Hartmaier Alexander:


Would be great if you had told us how you're sending the mails.
Catalyst::View::Email?

Regards, Alex





___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: AW: [Catalyst] Sending E-Mails

2008-10-02 Thread goetz



I use the email plugin:

use Catalyst qw/
   -Debug
   ConfigLoader
   Static::Simple
   StackTrace
   Prototype
   Email
   /;


Am 02.10.2008 um 13:41 schrieb Moritz Onken:



Am 02.10.2008 um 13:30 schrieb goetz:


sub send_email : Local {
  my ( $self, $c ,$params_href) =3D @_;
  $c->stash->{mail_felder} =3D $params_href,
  $c->email(
  header =3D> [
  To  =3D> '[EMAIL PROTECTED]',
  Subject =3D> 'Kontaktformular helektra.de',

  ],
  body =3D> $c->view('TT')->render($c,'email.tt2'),
  );

}

The code works with the built in server ..


Seems like you are not using View::Email. Could you please provide
the plugins you are loading in you helektra_de.pm?




___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: AW: [Catalyst] Sending E-Mails

2008-10-02 Thread Moritz Onken


Am 02.10.2008 um 13:45 schrieb goetz:




I use the email plugin:

use Catalyst qw/
   -Debug
   ConfigLoader
   Static::Simple
   StackTrace
   Prototype
   Email
   /;



Hi,

try to configure Plugin::Email to use a smtp server:

   __PACKAGE__->config->{email} = [
   'SMTP',
   'smtp.myhost.com',
   username => $USERNAME,
   password => $PASSWORD,
   ];

replace smtp.myhost.com with localhost, username and password
can be blank if your smtp server doesnt require auth for local
users.

Furthermore you might want to set the attribute of send_email to
Private and call the method with $self->send_email($c, $params);
Otherwise this method can be called by a request to this
controller via a browser.

Viele Grüße

Moritz
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: AW: [Catalyst] Sending E-Mails

2008-10-02 Thread goetz

Thanks for the hint.

But nothing changed.


Am 02.10.2008 um 13:51 schrieb Moritz Onken:



Am 02.10.2008 um 13:45 schrieb goetz:




I use the email plugin:

use Catalyst qw/
  -Debug
  ConfigLoader
  Static::Simple
  StackTrace
  Prototype
  Email
  /;



Hi,

try to configure Plugin::Email to use a smtp server:

  __PACKAGE__->config->{email} = [
  'SMTP',
  'smtp.myhost.com',
  username => $USERNAME,
  password => $PASSWORD,
  ];

replace smtp.myhost.com with localhost, username and password
can be blank if your smtp server doesnt require auth for local
users.

Furthermore you might want to set the attribute of send_email to
Private and call the method with $self->send_email($c, $params);
Otherwise this method can be called by a request to this
controller via a browser.

Viele Grüße

Moritz
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/




___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/