Not getting the Body Var Set

View: New views
5 Messages — Rating Filter:   Alert me  

Not getting the Body Var Set

by Jim Summers-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

Just started using PHPmailer.  I am also pretty new to php, but have
been programming for a while.

Things seem to be mostly working.  I can send an email but the variables
I set are not being used.

The Body does not seem to be getting set nor the Subject.  The
AddAddress is working though.  The Send function also works as I receive
the mail, but without the above variables set??

Any ideas / suggestions?

Thanks
--
Jim Summers
Computer Science - University of Oklahoma


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Phpmailer-general mailing list
Phpmailer-general@...
https://lists.sourceforge.net/lists/listinfo/phpmailer-general

Re: Not getting the Body Var Set

by Chris Weiss-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

can you provide sample code for the simplest use case in which this is
repeatable?


On Tue, Jun 9, 2009 at 2:42 PM, Jim Summers <jsummers@...> wrote:

> Hello,
>
> Just started using PHPmailer.  I am also pretty new to php, but have
> been programming for a while.
>
> Things seem to be mostly working.  I can send an email but the variables
> I set are not being used.
>
> The Body does not seem to be getting set nor the Subject.  The
> AddAddress is working though.  The Send function also works as I receive
> the mail, but without the above variables set??
>
> Any ideas / suggestions?
>
> Thanks
> --
> Jim Summers
> Computer Science - University of Oklahoma
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Phpmailer-general mailing list
> Phpmailer-general@...
> https://lists.sourceforge.net/lists/listinfo/phpmailer-general
>

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Phpmailer-general mailing list
Phpmailer-general@...
https://lists.sourceforge.net/lists/listinfo/phpmailer-general

Re: Not getting the Body Var Set

by Jim Summers-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Chris Weiss wrote:
> can you provide sample code for the simplest use case in which this is
> repeatable?

Pretty much straight off of the tutorial page codeworx:

<?php


require("class.phpmailer.php");

$mail = new PHPMailer();
$mail->IsSMTP();

$mail->Host = "localhost";
$mail->From = "webmaster@...";

$mail->AddAddress("jsummers@...");
$mail->Subject? = "First PHPMailer Message";

$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";

$mail->WordWrap = 50;

if(!$mail->Send()) {
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
}
else {
echo 'Message has been sent.';
}





?>

Like I say it sends the mail, just with  a null body and subject??

Thanks again.

>
>
> On Tue, Jun 9, 2009 at 2:42 PM, Jim Summers <jsummers@...> wrote:
>> Hello,
>>
>> Just started using PHPmailer.  I am also pretty new to php, but have
>> been programming for a while.
>>
>> Things seem to be mostly working.  I can send an email but the variables
>> I set are not being used.
>>
>> The Body does not seem to be getting set nor the Subject.  The
>> AddAddress is working though.  The Send function also works as I receive
>> the mail, but without the above variables set??
>>
>> Any ideas / suggestions?
>>
>> Thanks
>> --
>> Jim Summers
>> Computer Science - University of Oklahoma
>>
>>
>> ------------------------------------------------------------------------------
>> Crystal Reports - New Free Runtime and 30 Day Trial
>> Check out the new simplified licensing option that enables unlimited
>> royalty-free distribution of the report engine for externally facing
>> server and web deployment.
>> http://p.sf.net/sfu/businessobjects
>> _______________________________________________
>> Phpmailer-general mailing list
>> Phpmailer-general@...
>> https://lists.sourceforge.net/lists/listinfo/phpmailer-general
>>

--
Jim Summers
Computer Science - University of Oklahoma


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Phpmailer-general mailing list
Phpmailer-general@...
https://lists.sourceforge.net/lists/listinfo/phpmailer-general

Re: Not getting the Body Var Set

by Jim Summers-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello All,

I may have found a clue.  I can modify the vars for subject and body in
class.phpmailer.php and then it shows that as the subject and body in
the resulting email.

Not sure why the variables are not getting set from outside of that class?

Ideas / Suggestions.

TIA

Jim Summers wrote:

>
> Chris Weiss wrote:
>> can you provide sample code for the simplest use case in which this is
>> repeatable?
>
> Pretty much straight off of the tutorial page codeworx:
>
> <?php
>
>
> require("class.phpmailer.php");
>
> $mail = new PHPMailer();
> $mail->IsSMTP();
>
> $mail->Host = "localhost";
> $mail->From = "webmaster@...";
>
> $mail->AddAddress("jsummers@...");
> $mail->Subject? = "First PHPMailer Message";
>
> $mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
>
> $mail->WordWrap = 50;
>
> if(!$mail->Send()) {
> echo 'Message was not sent.';
> echo 'Mailer error: ' . $mail->ErrorInfo;
> }
> else {
> echo 'Message has been sent.';
> }
>
>
>
>
>
> ?>
>
> Like I say it sends the mail, just with  a null body and subject??
>
> Thanks again.
>
>>
>> On Tue, Jun 9, 2009 at 2:42 PM, Jim Summers <jsummers@...> wrote:
>>> Hello,
>>>
>>> Just started using PHPmailer.  I am also pretty new to php, but have
>>> been programming for a while.
>>>
>>> Things seem to be mostly working.  I can send an email but the variables
>>> I set are not being used.
>>>
>>> The Body does not seem to be getting set nor the Subject.  The
>>> AddAddress is working though.  The Send function also works as I receive
>>> the mail, but without the above variables set??
>>>
>>> Any ideas / suggestions?
>>>
>>> Thanks
>>> --
>>> Jim Summers
>>> Computer Science - University of Oklahoma
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Crystal Reports - New Free Runtime and 30 Day Trial
>>> Check out the new simplified licensing option that enables unlimited
>>> royalty-free distribution of the report engine for externally facing
>>> server and web deployment.
>>> http://p.sf.net/sfu/businessobjects
>>> _______________________________________________
>>> Phpmailer-general mailing list
>>> Phpmailer-general@...
>>> https://lists.sourceforge.net/lists/listinfo/phpmailer-general
>>>
>

--
Jim Summers
Computer Science - University of Oklahoma


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Phpmailer-general mailing list
Phpmailer-general@...
https://lists.sourceforge.net/lists/listinfo/phpmailer-general

Parent Message unknown Re: Not getting the Body Var Set

by Jim Summers-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Flemming Arnott wrote:
> Isn't it just that 'rogue' question mark after $mail->Subject?

It is mysteriously working now!  I think one of two things, either
wiping out those rogue questions marks, or my webserver had cached a
version with the question marks and it has reloaded a freshcopy.  I have
seen the later happen with some perl/cgi stuff before.

Many Thanks


>
> ????
>
> Jim Summers wrote:
>> Hello All,
>>
>> I may have found a clue.  I can modify the vars for subject and body in
>> class.phpmailer.php and then it shows that as the subject and body in
>> the resulting email.
>>
>> Not sure why the variables are not getting set from outside of that class?
>>
>> Ideas / Suggestions.
>>
>> TIA
>>
>> Jim Summers wrote:
>>  
>>> Chris Weiss wrote:
>>>    
>>>> can you provide sample code for the simplest use case in which this is
>>>> repeatable?
>>>>      
>>> Pretty much straight off of the tutorial page codeworx:
>>>
>>> <?php
>>>
>>>
>>> require("class.phpmailer.php");
>>>
>>> $mail = new PHPMailer();
>>> $mail->IsSMTP();
>>>
>>> $mail->Host = "localhost";
>>> $mail->From = "webmaster@...";
>>>
>>> $mail->AddAddress("jsummers@...");
>>> $mail->Subject? = "First PHPMailer Message";
>>>
>>> $mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
>>>
>>> $mail->WordWrap = 50;
>>>
>>> if(!$mail->Send()) {
>>> echo 'Message was not sent.';
>>> echo 'Mailer error: ' . $mail->ErrorInfo;
>>> }
>>> else {
>>> echo 'Message has been sent.';
>>> }
>>>
>>>
>>>
>>>
>>>
>>> ?>
>>>
>>> Like I say it sends the mail, just with  a null body and subject??
>>>
>>> Thanks again.
>>>
>>>    
>>>> On Tue, Jun 9, 2009 at 2:42 PM, Jim Summers <jsummers@...> wrote:
>>>>      
>>>>> Hello,
>>>>>
>>>>> Just started using PHPmailer.  I am also pretty new to php, but have
>>>>> been programming for a while.
>>>>>
>>>>> Things seem to be mostly working.  I can send an email but the variables
>>>>> I set are not being used.
>>>>>
>>>>> The Body does not seem to be getting set nor the Subject.  The
>>>>> AddAddress is working though.  The Send function also works as I receive
>>>>> the mail, but without the above variables set??
>>>>>
>>>>> Any ideas / suggestions?
>>>>>
>>>>> Thanks
>>>>> --
>>>>> Jim Summers
>>>>> Computer Science - University of Oklahoma
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Crystal Reports - New Free Runtime and 30 Day Trial
>>>>> Check out the new simplified licensing option that enables unlimited
>>>>> royalty-free distribution of the report engine for externally facing
>>>>> server and web deployment.
>>>>> http://p.sf.net/sfu/businessobjects
>>>>> _______________________________________________
>>>>> Phpmailer-general mailing list
>>>>> Phpmailer-general@...
>>>>> https://lists.sourceforge.net/lists/listinfo/phpmailer-general
>>>>>
>>>>>        
>>  

--
Jim Summers
Computer Science - University of Oklahoma


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Phpmailer-general mailing list
Phpmailer-general@...
https://lists.sourceforge.net/lists/listinfo/phpmailer-general