Forum Moderators: coopster

Message Too Old, No Replies

Call to undefined method Email::setReturnPath()

         

uanabana

4:01 pm on Oct 9, 2008 (gmt 0)

10+ Year Member



Hi everybody,

I'm trying to setup a newsletter integrated into a website using php.
The main file newsletter_send.html is connected, with a form action, to emailnewsletter.php which includes a file called email.inc.php
Everything works fine except for the function setReturnPath which refuses to work. I have specified this line on emailnewsletter.php

$mail->setReturnPath("my@email.com");

and this other on email.inc.php

$mailHeader .= "--".$attachmentBoundary. "--";
return mail($this->mailTo,$this->mailSubject, "",$mailHeader,"Return-Path: my@email.com\r\n");
}

but it always gives me the following error:

Fatal error: Call to undefined method Email::setReturnPath() in /nl/emailnewsletter.php on line 36

Can anyone help me?

Many thanks,

Andrea

grallis

9:10 pm on Oct 9, 2008 (gmt 0)

10+ Year Member



Hi Andrea -

Which email library are you using? It looks as if you're calling a method from the object $mail, but there is no method named setReturnPath()

Are you creating the object $mail before you start using it?