RSS

Sending Emails Using PHP

Wed, Oct 15, 2008

PHP

Sending emails in PHP is relatively simple, there are just a few things you need to remember.

The function we will be using in this script is mail ()

The first thing we need to do is is define our message in a function…

$message = "Write your message here";

Now we need to use the wordwrap () function in case any of the lines are larger than 70 characters

$message = wordwrap($message, 70);

Now we use the mail () function to send the email.

mail('mail@example.com', 'Write your subject here', $message)

And thats it in its simplist form.

You could work on this and add more functionality like adding text boxes and allowing who ever is using it to type in a message and any email address without seeing the full PHP code. Mabey using this you will be the next Hotmail :p

Rating: 5.9/10 (13 votes cast)
Share and Enjoy:
  • Digg
  • Google
  • Technorati
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Furl
  • Live
  • Reddit
  • Spurl

  • Subscribe
    • XML
    • Google Reader or Homepage
    • Add to My Yahoo!
    • Subscribe with Bloglines
    • Subscribe in NewsGator Online
    • BittyBrowser
    • Add to My AOL
    • Convert RSS to PDF
    • Subscribe in Rojo
    • Subscribe in FeedLounge
    • Subscribe with Pluck RSS reader
    • Solosub
    • MultiRSS
    • R|Mail
    • Rss fwd
    • Blogarithm
    • Eskobo
    • gritwire
    • BotABlog
    • Simpify!
    • Add to Technorati Favorites!
    • Add to netvibes
    • Add this site to your Protopage
    • Subscribe in NewsAlloy
    • Subscribe in myEarthlink
    • Add to your phone
    • Get RSS Buttons

, , , ,



This post was written by:

admin - who has written 41 posts on Unreal Media.


Contact the author

3 Comments For This Post

  1. Commenter Says:

    Great tutorial. Thanks

    Rating: 0.0/5 (0 votes cast)
  2. syntrax Says:

    good, thx, but how do I make it work?

    Rating: 0.0/5 (0 votes cast)
  3. How To Redirect A Page In Php Says:

    I found your site on faves.com bookmarking site.. I like it ..gave it a fave for you..ill be checking back later

    Rating: 0.0/5 (0 votes cast)

Leave a Reply