Calling PHP gurus

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

    Calling PHP gurus

    It's nice to see all the support in this newsgroup. Hopefully I'll be a
    contributor soon.

    For now I'm hoping you could answer a question about the mail function in
    PHP. When I use the mail command in my localhost, it's great. I can modify
    the headers, use html tags, etc. But when I use it on my web space (1and1),
    the header comes back as cgi-mailer-bounces-...@perfora.net , the header info
    I entered, shows in the message (instead of the header) and the html tags
    are displayed in the message as regular text.

    Of course the php.ini file on my webspace is read only, so is there any php
    commands I can use to override the display of the header and the use html
    tags?

    Any help would be greatly appreciated. Thanks and have a great day!


  • Mangina

    #2
    Re: Calling PHP gurus

    The only way I've EVER been able to get mail working 100% of the time (i.e.
    not bounced,
    not blocked, thru spam filters, etc.) is the use PHPMailer
    (http://phpmailer.sourceforge.net/).

    "Lochness" <someone@somewh ere.com> wrote in message
    news:7Ps2c.7263 85$ts4.121656@p d7tw3no...[color=blue]
    > It's nice to see all the support in this newsgroup. Hopefully I'll be a
    > contributor soon.
    >
    > For now I'm hoping you could answer a question about the mail function in
    > PHP. When I use the mail command in my localhost, it's great. I can[/color]
    modify[color=blue]
    > the headers, use html tags, etc. But when I use it on my web space[/color]
    (1and1),[color=blue]
    > the header comes back as cgi-mailer-bounces-...@perfora.net , the header[/color]
    info[color=blue]
    > I entered, shows in the message (instead of the header) and the html tags
    > are displayed in the message as regular text.
    >
    > Of course the php.ini file on my webspace is read only, so is there any[/color]
    php[color=blue]
    > commands I can use to override the display of the header and the use html
    > tags?
    >
    > Any help would be greatly appreciated. Thanks and have a great day!
    >
    >[/color]


    Comment

    • Hayden Kirk

      #3
      Re: Calling PHP gurus

      They dont support html email...


      "Lochness" <someone@somewh ere.com> wrote in message
      news:7Ps2c.7263 85$ts4.121656@p d7tw3no...[color=blue]
      > It's nice to see all the support in this newsgroup. Hopefully I'll be a
      > contributor soon.
      >
      > For now I'm hoping you could answer a question about the mail function in
      > PHP. When I use the mail command in my localhost, it's great. I can[/color]
      modify[color=blue]
      > the headers, use html tags, etc. But when I use it on my web space[/color]
      (1and1),[color=blue]
      > the header comes back as cgi-mailer-bounces-...@perfora.net , the header[/color]
      info[color=blue]
      > I entered, shows in the message (instead of the header) and the html tags
      > are displayed in the message as regular text.
      >
      > Of course the php.ini file on my webspace is read only, so is there any[/color]
      php[color=blue]
      > commands I can use to override the display of the header and the use html
      > tags?
      >
      > Any help would be greatly appreciated. Thanks and have a great day!
      >
      >[/color]


      Comment

      • Manuel Lemos

        #4
        Re: Calling PHP gurus

        Hello,

        On 03/06/2004 08:05 PM, Lochness wrote:[color=blue]
        > It's nice to see all the support in this newsgroup. Hopefully I'll be a
        > contributor soon.
        >
        > For now I'm hoping you could answer a question about the mail function in
        > PHP. When I use the mail command in my localhost, it's great. I can modify
        > the headers, use html tags, etc. But when I use it on my web space (1and1),
        > the header comes back as cgi-mailer-bounces-...@perfora.net , the header info
        > I entered, shows in the message (instead of the header) and the html tags
        > are displayed in the message as regular text.
        >
        > Of course the php.ini file on my webspace is read only, so is there any php
        > commands I can use to override the display of the header and the use html
        > tags?[/color]

        If they are using safe mode probably not.

        Anyway, you may want to try this class that lets you specify the
        return-path address as a (virtual) header of your mail messages.

        It comes with several sub-classes to let you try different delivery
        modes (mail() function, sendmail program, qmail program and smtp TCP
        connection.) Depending on what your ISP blocked, you may want to try one
        each of the sub-classes until one works.

        To simplify your task, the class comes with several wrapper functions
        named sendmail_mail() , qmail_mail() and smtp_mail(), each using one of
        the sub classes, that emulate the mail() function, so you do not have to
        change your scripts much.




        --

        Regards,
        Manuel Lemos

        PHP Classes - Free ready to use OOP components written in PHP
        Free PHP Classes and Objects 2026 Versions with PHP Example Scripts, PHP Tutorials, Download PHP Scripts, PHP articles, Remote PHP Jobs, Hire PHP Developers, PHP Book Reviews, PHP Language OOP Materials


        PHP Reviews - Reviews of PHP books and other products


        Metastorage - Data object relational mapping layer generator

        Comment

        • Lochness

          #5
          Re: Calling PHP gurus

          Woohoo it worked awesome! And I only need to include two class files.

          Thank you so much Mangina!!

          "Mangina" <support@micros oft.com> wrote in message
          news:104kmicgbi 8vca0@corp.supe rnews.com...[color=blue]
          > The only way I've EVER been able to get mail working 100% of the time[/color]
          (i.e.[color=blue]
          > not bounced,
          > not blocked, thru spam filters, etc.) is the use PHPMailer
          > (http://phpmailer.sourceforge.net/).
          >
          > "Lochness" <someone@somewh ere.com> wrote in message
          > news:7Ps2c.7263 85$ts4.121656@p d7tw3no...[color=green]
          > > It's nice to see all the support in this newsgroup. Hopefully I'll be a
          > > contributor soon.
          > >
          > > For now I'm hoping you could answer a question about the mail function[/color][/color]
          in[color=blue][color=green]
          > > PHP. When I use the mail command in my localhost, it's great. I can[/color]
          > modify[color=green]
          > > the headers, use html tags, etc. But when I use it on my web space[/color]
          > (1and1),[color=green]
          > > the header comes back as cgi-mailer-bounces-...@perfora.net , the header[/color]
          > info[color=green]
          > > I entered, shows in the message (instead of the header) and the html[/color][/color]
          tags[color=blue][color=green]
          > > are displayed in the message as regular text.
          > >
          > > Of course the php.ini file on my webspace is read only, so is there any[/color]
          > php[color=green]
          > > commands I can use to override the display of the header and the use[/color][/color]
          html[color=blue][color=green]
          > > tags?
          > >
          > > Any help would be greatly appreciated. Thanks and have a great day!
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • gmuldoon

            #6
            Re: Calling PHP gurus

            someone@somewhe re.com says...
            [color=blue]
            > For now I'm hoping you could answer a question about the mail function in
            > PHP. When I use the mail command in my localhost, it's great. I can modify
            > the headers, use html tags, etc. But when I use it on my web space (1and1),
            > the header comes back as cgi-mailer-bounces-...@perfora.net , the header info
            > I entered, shows in the message (instead of the header)[/color]

            Email "from" and "reply-to" values set in the "header" section are
            probably being over-written by security setting in mail on the server.
            Not unusual. Try setting these using the fifth parameter of the mail
            function instead (-f for from, reply-to). The PHP install account will
            need to be "trusted" by your mail program. Eg:

            $to="you@there. com";
            $subject="The subject";
            $headers="";
            $body="The message.";
            $params="-f me@here.com";

            mail($to, $subject, $body, $headers, $params);

            Geoff M

            Comment

            Working...