Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1]
Send this topic | Print
Topic: sending email with php  (Read 2807 times)
« on: November 23, 2005, 11:09:02 PM »
moodotcom Offline
Newbie

View Profile
*
Posts: 1



I realise that sending email with php is turned "off" on t35 because of laws. But could u make some kind of mail function so that u can send an email only to ur login address... For example, I want a form that sends me an email. Mailto is really annoying, so I use php. the mail function is disabled and i can't send an email... But there is this great function that doesn't allow me to specify the recipient but still send emails (the recipient would be the address I used for signing up and verification)

say my email is blah@hotmail.com
the new functio would be:

sendmail(body, title/subject)
{
         mail(title/subject, body, <the email i used to sign up as recip>);
}  (this is just what it might be like grin)

Thanks
Report to moderator   Logged

 
« Reply #1 on: February 15, 2006, 06:32:11 AM »
Do you practice what you preach?
cool1.t35.com Offline
Member

View Profile WWW
***
Posts: 161



T35 would have to make a mail account. I think they had it years ago. But as usual abuse forced it to shut down. Also the way you made that php script someone could just open view source.

I am a dodegy on php so don't think i am right or anything lol...
Report to moderator   Logged

The Light can never overpower the darkness alone. Love is needed.

Islam is peace.

http://www.islamhope.net
« Reply #2 on: April 20, 2006, 09:58:30 AM »
m0u53m4t Offline
Newbie

View Profile
*
Posts: 2



I realise that sending email with php is turned "off" on t35 because of laws. But could u make some kind of mail function so that u can send an email only to ur login address... For example, I want a form that sends me an email. Mailto is really annoying, so I use php. the mail function is disabled and i can't send an email... But there is this great function that doesn't allow me to specify the recipient but still send emails (the recipient would be the address I used for signing up and verification)

say my email is blah@hotmail.com
the new functio would be:

sendmail(body, title/subject)
{
         mail(title/subject, body, <the email i used to sign up as recip>);
}  (this is just what it might be like grin)

Thanks

I was tryinjg to use this code:

<?php
ini_set ("SMTP","mail.cardiffhigh.cardiff.sch.uk");
ini_set ("sendmail_from","headmaster@cardiffhigh.cardiff.sch.uk");
$email= 'owen.campbell-moore@cardiffhigh.cardiff.sch.uk';
mail ($email, 'You Have Mail!', hello);
echo "email sent to {$email}";
?>

but it wasn't working. I just want people to be able to give me comments and for them to be mailed to me. Ill have to test your idea. Anyway, why would you want to send an email like that? I ended up getting around it with this script (feel free to use):

Code:
<?php
$filename 
"logfile.txt";
if (isset(
$_GET["name"])){
 if (!
$handle fopen($filename'a')) {
  die (
"Error while opening.");
 } else {
  if (
fwrite($handle"\r\n" $_GET["name"]."\r\n" $_GET["comments"]) === FALSE){
   die(
"Error while writing.");
  }
 }
 echo 
"Added!";
 
fclose($handle);
} else {
 echo 
"<form action=\"".$_SERVER['PHP_SELF']."\" method=\"GET\">\r\n";
 echo 
"<input type=\"text\" name=\"name\" size=\"24\" />\r\n";
 echo 
"<input type=\"text\" name=\"comments\" size=\"24\" />\r\n";
 echo 
"<input type=\"submit\" value=\"Send!\" />\r\n";
 echo 
"</form>\r\n";
}
?>

grin
« Last Edit: April 20, 2006, 10:25:42 AM by m0u53m4t » Report to moderator   Logged
 
Pages: [1]
Send this topic | Print
Jump to:  

Powered by SMF | SMF © 2006-2008, Simple Machines LLC