SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Feb 2003
    Location
    Berlin
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    -f option in mail() and sender (2 questions)

    I have two question concening sending mails thru php

    1.)
    What does the -f option (envelope sender address) exactly mean? And how would I set this option in this case:
    From: My Name <mail@domain.tdl>

    Here an example:
    Code:
    to_address@domain.de, Test Mail, Dies ist eine Testmail, Message-ID: <20001239639825.359anything@sender.de>
    From: My Name <mail@sender.de>
    Where would I set the -f?

    2.)
    When I have a mail as in the example above, the mail queue shows something like
    anonymous@sender as sender. Only if I add a Return-Path I get the Return-Path address shown as sender.
    - Is this correct?
    - Why isn't the From address used as sender?
    - Can this make difficulties sending emails (i.e. mailservers not accepting these mails)?

    Thanks
    Fl÷zen

  2. #2
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The -f is the from address:
    PHP Code:
    mail(..., ..., ..., '-fmyemail@domain.com'); 
    IIRC that shows up as the sender.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  3. #3
    SitePoint Addict
    Join Date
    Feb 2003
    Location
    Berlin
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So
    PHP Code:
    mail($email$subject$message'-fmail@domain.de'); 
    and
    PHP Code:
    mail($email$subject$message'From: mail@domain.de'); 
    are the same?


Tags for this Thread

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
  •