Jump to content


Photo

sending email


  • Please log in to reply
1 reply to this topic

#1 Sevarf2

Sevarf2

    Sr. Member

  • Members
  • PipPipPipPip
  • 301 posts
  • 13

  • LocationBratislava

Posted 17 February 2011 - 09:11 AM

It's possible to use some internal function for sending email?
I want every time my form is submitted to send an email to my email, like the comment system, i guess pw has a well done email system inside...

#2 ryan

ryan

    Hero Member

  • Administrators
  • 5,811 posts
  • 3136

  • LocationAtlanta, GA

Posted 17 February 2011 - 12:35 PM

Actually PHP is what the comments system uses for sending email. And it doesn't get any simpler:

<?php mail("you@company.com", "Subject", "E-Mail Body");

If you want to send HTML:

<?php mail("you@company.com", "Subject", "HTML Content", "Content-Type: text/html");

If you want to include a specific FROM address:

<?php mail("you@company.com", "Subject", "HTML Content", "From: bob@company.com");

If you want to do both:

<?php mail("you@company.com", "Subject", "E-Mail Body", "From: bob@company.com\nContent-Type: text/html");





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users