I have programmed for mailing in php.but how can i send mail through local server?
A:
You need to setup an SMTP server. You can use iis for this purpose.
Chathuranga Chandrasekara
2010-01-08 07:50:31
+2
A:
A full-on SMTP server would be overkill for just mailing from a script. SMTP is for clients connecting to the server and sending mail.
To send mail from a script, use sendmail or postfix
jonfhancock
2010-01-08 07:59:39
+1
A:
Assuming the server is already set up to have either SMTP and/or sendmail, then most likely what you are looking for is the mail() function.
Basic usage for that would be something like this:
mail( '[email protected]', 'The subject', 'A short or long message' );
when sending a long message, use the wordwrap() function, to ensure that the message is broken displayed properly by the client.
$message = wordwrap($message, 70);
Of course, if this does not work, then you may need to contact your server administrator to make sure that everything is correctly setup to allow you to send email.
TehDrew
2010-01-08 08:09:48