>>>  Home   User-Center   Board
     
 

 
Post new topic   Reply to topic    Webhosting Forum » PHP & MySQL » PHP sendmail
View previous topic :: View next topic  
Author Message
mywebtest
Funnilein


Joined: 05 Apr 2008
Posts: 2

PostPosted: 08.04.08 02:11    Post subject: PHP sendmail Reply with quote
Is the send mail function available? and how's the SMTP comfigured "w/out autho"?
Has the package Mail.php been installed and what's the path?
Thanks in advance for your help
Back to top
View user's profile Send private message
crushmaster
Fun-Schreck


Joined: 26 Jul 2007
Posts: 171

PostPosted: 08.04.08 04:37    Post subject: Reply with quote
smtp functions are not available on your funpic server. you can use php mail() without smtp. Mail.php seems to be a PEAR package. PEAR is not installed, so you have to download the package and upload it to a directory on your webspace.

ps: i´ve found a bug in your html form.

<form mothod="post" action ="/php/my_webform.php">

should be
<form method="post" action="/php/my_webform.php">

now the default method GET will be used. submit your form and take a look at the url in your browser. you can see all parameters were added to the address. GET requests are limited to 255 characters. a POST request will be invisible for the user and you can send 3mb of data. that is much more than 255 characters.
_________________
http://www.conmunix.net the web application security experts
Back to top
View user's profile Send private message
mywebtest
Funnilein


Joined: 05 Apr 2008
Posts: 2

PostPosted: 08.04.08 12:26    Post subject: Reply with quote
I am using mothod "POST", yet the parameters still apppear in the browser's address bar.
Any ideas??
The php application's still not working... mail() does not seem to be working and I can't upload Mail.php because it requires SMTP function and PEAR.
Back to top
View user's profile Send private message
crushmaster
Fun-Schreck


Joined: 26 Jul 2007
Posts: 171

PostPosted: 09.04.08 04:07    Post subject: Reply with quote
1. there is no attribute mothod!!! did you read my post? you have to rename it into method.

2. the mail function needs at least 3 parameters!

usage:
Code:
mail("receiver@example.com","your subject","your message");


you can add a string as the 4th parameter that contains the mail header.

for example:
Code:
$headers  = "From: Sender Name <sender@example.com>\n";
$headers .= "Reply-To: Sender Name <sender@example.com>\n";
$headers .= "X-Sender: Sender Name <sender@example.com>\n";
$headers .= "X-Mailer: PHP ".phpversion()."\n";
$headers .= "Return-Path: Sender Name <sender@example.com>\n";
$headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
mail("receiver@example.com","your subject","your message",$headers);


you should use the second code in order to send your own sender address and name. otherwise the sender address will be something like anything@funpic.org so if the receiver wants to send a reply, the mail will get lost somewhere.

you can also change the Content-Type to text/html if you want to use html code within the message.
_________________
http://www.conmunix.net the web application security experts
Back to top
View user's profile Send private message
Post new topic   Reply to topic    Webhosting Forum » PHP & MySQL

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Impressum Datenschutz