RE: re: php3 vs ph4 mail() function (help)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> It appears some people are backing off this question
> maybe because they are not aware of how to do it.

I think no one is answering because of the type of question being asked.
mail() did not change between version 3 and version 4.  Something in the
config is wrong or something in the code is wrong.  Maybe it is relying on a
variable from a POST or a GET and the v4 install doesn't have GLOBALS on.  I
think refusing to listen to people saying that mail() is not the problem and
just insisting that some send over some fully functioning tested code is
turning everyone off.

Here is an example of pulling an email address from a mysql database and
sending them a message contained in a variable $message

$link = mysql_connect($host,$user,$pw) or die(mysql_error());
mysql_select_db($dbname) or die(mysql_error());
$query = "SELECT $emailcol from $tablename WHERE $somecol =
'$somecriteria'";
$result = mysql_query($query) or die(mysql_error());
$emailaddress = mysql_result($result,0) or die(mysql_error());
mail($emailaddress,$subject,$message,$additionalheaders);

I do not see how this excercise in futility has helped anyone though, that
is very basic and very generic code.



> -----Original Message-----
> From: JeRRy [mailto:jusa_98@yahoo.com]
> Sent: Thursday, April 10, 2003 6:59 PM
> To: robleyd@ozemail.com.au
> Cc: php-db@lists.php.net
> Subject:  re: php3 vs ph4 mail() function (help)
>
>
> (assuming
>
> you are using Win) or may have a different value for
> your sendmail call
> (for *nix)
> I am using linux, not win. (eck)  I don't like Win for
> server applications or anything like that, prefer the
> good 'ol linux systems.
>
> In essence, mail() under php3 is no different to mail
> under php4.
> Well that is what I thought also.  But I just copied
> my scriopts over to another host and they are
> rejecting them also.  They use php4 also.  So
> something in my code (or alot of it) is funny with
> php4 but works under php3.  That is why I seeked a
> basic code that could point me in the right direction.
>  As my code does not wanna look at php4.  There is no
> such code errors as it says the email sent when it
> never...  So it's something to do with my mail()
> functions rather than my connection.  (i think)
>
> If you have a basic code I could look at and add my
> values myself that would be great.  Basically I need a
> code that will fetch email addresses from a mysql
> database and send via email a message.
>
> It appears some people are backing off this question
> maybe because they are not aware of how to do it.
>
> I appreciate honesty from this 1 person, who
> eventually said I can't help sorry.  After saying he
> could but in the end he really never knew or miss
> understood the question.  If you can't do it say so,
> don't say in the terms you can help but not now and
> waste other peoples times. I trust you know how to do
> this as you responded.
>
> I believe posting the code on this board also would
> help others, and would save re-posting it later as
> people can look back and find this thread to answer
> their question.  And also I can refrence this thread
> for future reference.
>
> All help is appreicated, and surely someone out there
> can help me.  It's sounds basic but I can't get around
> to why my old code won't work.
>
> Thanks!
>
>
> --
> Quod subigo farinam
>
> $email =~ s/oz$/au/o;

>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux