Hey all,

I have the following code being handled after a Contact Us form 
submission. The first thing I do is fill the $contact object, call 
$contact->save(); and then this:

# begin code #
##########

 if( ! empty( $contact->email ) )
 {
    if( ! empty( $contact->name ) )
    {
       $from = array( $contact->email => $contact->name );
    }
    else
    {
       $from = $contact->email;
    }
 }
 else
 {
    $from = array( '[ email has been extracted for privacy ]' => 
'Contact Form - No Email' );
 }

 $to = '[ email has been extracted for privacy ]';
 $subject = 'Contact Us Form Submission';

 $body = print_r( $this->contact_submit, true );

 $message = $this->getMailer()->compose( $from, $to, $subject, $body );

 $this->getMailer()->send( $message ); 

#   end code   #
##########


The problem is, it's not throwing an error, but I'm not receiving any 
email either.

What am I doing wrong?

** $this->contact_submit in the $body variable is equal to 
$request->getParameter('contact');

Thanks

--

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


Reply via email to