checking a function (mail)
Moderator: General Moderators
-
godonholiday
- Forum Newbie
- Posts: 7
- Joined: Mon Feb 07, 2005 3:12 pm
- Location: liverpool
checking a function (mail)
what line of the config table do i look at after i have run phpini()
i am trying to find out if the mail function can be used.
any help would be great
thanks in advance
g
i am trying to find out if the mail function can be used.
any help would be great
thanks in advance
g
-
godonholiday
- Forum Newbie
- Posts: 7
- Joined: Mon Feb 07, 2005 3:12 pm
- Location: liverpool
hotmail accounts
is it possibel to use a php form to send the form information as an email to a hotmail or yahoo account?
thanks for the help
thanks for the help
-
godonholiday
- Forum Newbie
- Posts: 7
- Joined: Mon Feb 07, 2005 3:12 pm
- Location: liverpool
not sure?
so should't this code work?
thanks again
thanks again
Code: Select all
<?php
$john = "12345";
mail("info@hotmail.com","This is for john","send an email to Gavin on someaddress@hotmail.com when you get this");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Hello <?php echo $john ?> IF YOU GET THIS EMAIL PLEASE SEND AN EMAIL TO GAVIN ON some address@hotmail.com
</body>
</html>- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
provided mail is properly configured, it should work. Please use
Code: Select all
/Code: Select all
tags.-
godonholiday
- Forum Newbie
- Posts: 7
- Joined: Mon Feb 07, 2005 3:12 pm
- Location: liverpool
sorry
jumped the gun a little and have just read the before you post file.
do i have to configure hotmail?? because right now nothing is happening? it displays the hello message and reads the php variable??
hmm im desprate to get this working.
thanks
do i have to configure hotmail?? because right now nothing is happening? it displays the hello message and reads the php variable??
hmm im desprate to get this working.
thanks
-
godonholiday
- Forum Newbie
- Posts: 7
- Joined: Mon Feb 07, 2005 3:12 pm
- Location: liverpool
oh
ahh so i have to congig the ini file on the server and the machine im developing on.
ill give it a go, but will prob be back in an hour or two.
thanks for your help
g
ill give it a go, but will prob be back in an hour or two.
thanks for your help
g
-
godonholiday
- Forum Newbie
- Posts: 7
- Joined: Mon Feb 07, 2005 3:12 pm
- Location: liverpool
this is what i have now
Is there any way that you can test this please. I dont know how to change any of the other config settings, you can check out the config at
http://appsform.pwp.blueyonder.co.uk/test.php
cheers for your help
http://appsform.pwp.blueyonder.co.uk/test.php
cheers for your help
Code: Select all
<?php
$john = "12345";
ini_set(sendmail_from, "form@formsite.co.uk");
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "To: example@yahoo.com\r\n";
$headers .= "From: form@formsite.co.uk\r\n";
/* and now mail it */
mail("example@yahoo.com.com", "this is the subject", "this is the body", "$headers");
ini_restore(sendmail_from);
phpinfo();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Hello <?php echo $john ?><br>
<?php echo $headers ?>
</body>
</html>