How do i send a message?

how can i send message?

  • I have programmed for mailing in php.but how can i send mail through local server?

  • Answer:

    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 http://php.net/manual/en/function.mail.php

subhash at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

You could also take a look at http://se.php.net/manual/en/book.mail.php regarding mailing. Good luck!

Anders

Assuming the server is already set up to have either SMTP and/or sendmail, then most likely what you are looking for is the http://php.net/mail. 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 http://php.net/wordwrap, 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

You need to setup an SMTP server. You can use iis for this purpose.

Chathuranga Chandrasekara

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.