SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict devil cat's Avatar
    Join Date
    Apr 2003
    Location
    Reno
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    email script problem

    I am using the standard php mail function as follows:

    Code:
    $fromaddress = "set@set.com";
    $toaddress = "set1@set1.com";
    $subject = "test";
    $content = "content";
    mail($toaddress, $subject, $content, $fromaddress);


    This sends the mail just fine, except that it pulls a foreign from address from the host and places the from address value in the content.

    What am I doing wrong?

  2. #2
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    mail($toaddress$subject$content"From: $fromaddress"); 
    Caught me out when I tried it the first time too

  3. #3
    SitePoint Addict devil cat's Avatar
    Join Date
    Apr 2003
    Location
    Reno
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That worked. Thank you so much.


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
  •