SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Thread: PHP mailer

  1. #1
    SitePoint Enthusiast weblover1984's Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP mailer

    Hi,
    I'm looking for someone who might know how to make a mailer.php with my specified requirements.

    I have a AJAX form on my website, with inputs, 'name', 'email', 'phone' and 'message'. The IDs for each of these inputs are 'contact_name', 'contact_email', 'contact_phone' and 'contact_message'.

    I would need my email address put into this so I can receive emails from the form and the title of the email can be customised something like eg. 'Contact form submission'.

    Thanks.

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    72 Post(s)
    Tagged
    0 Thread(s)
    If it's an AJAX form (Which i highly doubt, by the way. Your form may make an AJAX call, but unless you're building it dynamically, it's just a form.), what is it AJAX'ing? Have you tried to do the mail call?

  3. #3
    SitePoint Enthusiast weblover1984's Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, If it's not an AJAX form then what?

  4. #4
    SitePoint Guru r2d2's Avatar
    Join Date
    Dec 2003
    Location
    In my van, fool!
    Posts
    646
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Presumably the input fields are POSTed to a PHP script on your server?

    If so, you'll want to have a look at PHP's filter functions (also here) to sanitize the values you get sent. Then the mail function to send yourself the results.

  5. #5
    SitePoint Guru r2d2's Avatar
    Join Date
    Dec 2003
    Location
    In my van, fool!
    Posts
    646
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by weblover1984 View Post
    Ok, If it's not an AJAX form then what?
    Presumably you mean that you are sending the results of the form via js, not via a normal form submit?

    Either way, it doesn't really make much difference how the results get to your server, it sounds like you need to read up on how to take user inputs and mail them - see my answer above.

  6. #6
    SitePoint Enthusiast weblover1984's Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm a PHP newbie, so what I'm really asking is for someone to make one for me...and yes it's JS r2d2.

  7. #7
    SitePoint Guru r2d2's Avatar
    Join Date
    Dec 2003
    Location
    In my van, fool!
    Posts
    646
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "someone to make one for me" for ?

  8. #8
    SitePoint Enthusiast weblover1984's Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r2d2 View Post
    "someone to make one for me" for ?
    Pick one of the following instead:

    "You scratch my back I'll scratch yours"
    "I'm helping a fellow web developer and because it's free I have a nice warm feeling inside"

  9. #9
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    72 Post(s)
    Tagged
    0 Thread(s)
    We're here to teach, not do.

    At least read the material and TRY yourself first, then come back with your code and we'll help point you in the right direction. (The manual pages have plenty of examples for you to copy/paste.)

  10. #10
    SitePoint Enthusiast weblover1984's Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StarLion View Post
    We're here to teach, not do.

    At least read the material and TRY yourself first, then come back with your code and we'll help point you in the right direction. (The manual pages have plenty of examples for you to copy/paste.)
    Cheers, thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •