Jump to content
xisto Community
Sign in to follow this  
brunomokan

Php Help

Recommended Posts

There are only three parameters that must be set with mail() as below. You will note that one additional parameter $headers is also used.

<?php$to	  = 'someone@ahost.comt';$subject = 'E-Mail Test with PHP';$message = 'This is just a test of the email to see what it will do.'."\r\n";$headers = 'From: you@yourhost.com' . "\r\n" .	'Reply-To: you@yourhost.com' . "\r\n" .	'X-Mailer: PHP/' . phpversion();mail($to, $subject, $message, $headers);echo "Mail has been sent!";?>
The $message parameter can not be more than 70 character per line and must be followed with a newline or n. The $headers are optional and would have things like From: Reply-To: (anti-spam-(anti-spam-(anti-spam-(anti-spam-(anti-spam-(anti-spam-(anti-spam-(anti-spam-(anti-spam-bcc:))))))))) Cc: or such. Each additional $header should be seperated with a carriage return and line feed or rn To see more about this function go here to mail() in the manual.

 

If you copy the above and make the necessary adjustments to the email addresses and save it to your Xisto site and then just type the name of the file into your browsers address bar it should send an email. I would suggest sending one to your self. NOTE the editor will not allow the back slash "\" so the r and the n should of course have these, also the anti spam stuff was added by the script not me.

Edited by Houdini (see edit history)

Share this post


Link to post
Share on other sites

Ohhhh I have a Question here :Most Free Web Hosts disable some of the php functions ...some of them are phpinfo() and mail() ...So if there is any registered user here who have a Website with Asta Host, please tell me whether Xisto has got these functions enabled or not ?

Share this post


Link to post
Share on other sites

Ohhhh I have a Question here :Most Free Web Hosts disable some of the php functions ...
some of them are phpinfo() and mail() ...
So if there is any registered user here who have a Website with Asta Host,
please tell me whether Xisto has got these functions enabled or not ?


I wanna know it too, now I know how to use the mail() function, but i don't know if I can use it here!!!!
thanks.

one more question, if i don't include the headers, my mail will be moved to spam????
Edited by brunomokan (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.