sending mail problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • >>Shailesh

    sending mail problem

    hi,
    my script(IMAP email client) is sending mail using imap_mail()
    function.


    imap_mail($To, $Subject, $Body, $headers);


    $headers = "From: <$From>\n";
    $headers .= "X-Sender: <$U@$DOMAIN>\n" ;


    i hv given imap host address of mauj(my server).but while sending mail
    it is
    sending from my server not from mauj server.(while runnig tht script
    from my end) please help me how to solve this problem.
    Thank you.


    Shailesh.

  • Richard Brooks

    #2
    Re: sending mail problem

    >>Shailesh<< wrote:[color=blue]
    > hi,
    > my script(IMAP email client) is sending mail using imap_mail()
    > function.
    >
    >
    > imap_mail($To, $Subject, $Body, $headers);
    >
    >
    > $headers = "From: <$From>\n";
    > $headers .= "X-Sender: <$U@$DOMAIN>\n" ;
    >
    >
    > i hv given imap host address of mauj(my server).but while sending mail
    > it is
    > sending from my server not from mauj server.(while runnig tht script
    > from my end) please help me how to solve this problem.
    > Thank you.
    >
    >
    > Shailesh.
    >[/color]

    This might sound silly but have you tried reversing the lines thereby
    setting up the $headers variable before calling the function ?

    [color=blue]
    > $headers = "From: <$From>\n";
    > $headers .= "X-Sender: <$U@$DOMAIN>\n" ;
    >
    > imap_mail($To, $Subject, $Body, $headers);
    >[/color]


    Richard.
    --
    Celebrate Diwali safely!

    Keep an eye on those naked flames.

    Comment

    Working...