FROM_HEADER problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Oliver Spiesshofer

    FROM_HEADER problem

    Hi,

    when using mail(), the FROM that I set in my function variables is always
    changed. If I set the FROM email to user@mydomain.c om, it is always
    replaced to user@provider.c om. I believe its because the provider has the
    FROM_HEADER set to provider.com.

    is there any way to prevent this? cant I set an alternative from_header
    with htaccess or similar?

    thanks

    Oliver

  • Jon Kraft

    #2
    Re: FROM_HEADER problem

    Oliver Spiesshofer <oliver@email.c om> wrote:
    [color=blue]
    > when using mail(), the FROM that I set in my function variables is always
    > changed. If I set the FROM email to user@mydomain.c om, it is always
    > replaced to user@provider.c om. I believe its because the provider has the
    > FROM_HEADER set to provider.com.
    >
    > is there any way to prevent this? cant I set an alternative from_header
    > with htaccess or similar?[/color]

    Hi Oliver,

    It would help if you could post which OS you have your script running, and
    the code which calls mail().

    Cheers;
    JOn

    Comment

    • Oliver Spiesshofer

      #3
      Re: FROM_HEADER problem

      Jon Kraft <jon@jonux.co.u k> wrote in
      news:bm17bh$gu2 rg$2@ID-175424.news.uni-berlin.de:
      [color=blue]
      > Oliver Spiesshofer <oliver@email.c om> wrote:
      >[color=green]
      >> when using mail(), the FROM that I set in my function variables is
      >> always changed. If I set the FROM email to user@mydomain.c om, it is
      >> always replaced to user@provider.c om. I believe its because the
      >> provider has the FROM_HEADER set to provider.com.
      >>
      >> is there any way to prevent this? cant I set an alternative
      >> from_header with htaccess or similar?[/color]
      >
      > Hi Oliver,
      >
      > It would help if you could post which OS you have your script running,
      > and the code which calls mail().
      >
      > Cheers;
      > JOn
      >[/color]

      Hi JOn,

      its Linux, and the code is:

      mail("recipient @somedomain.com ", "test subject", "test body text", "From:
      username <register@mydom ain.com>");

      is there a check whether the mydomain.com is equal to the actual domain?

      Oliver

      Comment

      • Jon Kraft

        #4
        Re: FROM_HEADER problem

        Oliver Spiesshofer <oliver@email.c om> wrote:
        [color=blue]
        > Jon Kraft <jon@jonux.co.u k> wrote:
        >[color=green]
        >> Oliver Spiesshofer <oliver@email.c om> wrote:
        >>[color=darkred]
        >>> when using mail(), the FROM that I set in my function variables is
        >>> always changed. If I set the FROM email to user@mydomain.c om, it is
        >>> always replaced to user@provider.c om. I believe its because the
        >>> provider has the FROM_HEADER set to provider.com.
        >>>
        >>> is there any way to prevent this? cant I set an alternative
        >>> from_header with htaccess or similar?[/color]
        >>
        >> It would help if you could post which OS you have your script running,
        >> and the code which calls mail().[/color]
        >
        > its Linux, and the code is:
        >
        > mail("recipient @somedomain.com ", "test subject", "test body text", "From:
        > username <register@mydom ain.com>");[/color]

        Hi Oliver,

        Try:

        mail("recipient @somedomain.com ", "test subject", "test body text", "From:
        username <register@mydom ain.com>", "-fregister@mydom ain.com");

        If this doesn't work, your provider's mail program settings won't allow
        changing the "From" header. In doubt get in contact with them directly.

        HTH,
        JOn

        Comment

        Working...