AW: [Catalyst] Sending E-Mails
    goetz 
    devel at helektra.de
       
    Thu Oct  2 12:30:41 BST 2008
    
    
  
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      => 'goetz.verdieck at helektra.de',
                 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
>
>
    
    
More information about the Catalyst
mailing list