Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Nov 2002
    Location
    USA
    Posts
    5
    Member #
    293
    I bet most people here are familiar with the FormMail script. I don't know any perl, and I have a quick question. Hopefully, a simple question. I want the "from" field in the email header, to always contain the same email address --- myname@mydomain.com. How? Thanks.

    Just want to add that this version of FormMail is from the NMS Project --- http://nms-cgi.sourceforge.net/ --- so it's more secure.

    PHP Code:
      open_sendmail_pipe(\*MAIL$mailprog);

      print 
    MAIL $xheader, <<EOMAIL;
    To$Config{recipient}
    From$email$realname
    Subject
    $subject $Config{realname

  2.  

  3. #2
    Senior Member energizze's Avatar
    Join Date
    Oct 2002
    Posts
    260
    Member #
    238
    open_sendmail_pipe(*MAIL, $mailprog);

    print MAIL $xheader, <<EOMAIL;
    To: $Config{recipient}
    From: myname\@mydomain.com
    Subject: $subject $Config{realname}



    try that.

    always escape the @ in your email address with a backslash.





    If your are know perl then heres a piece of code that sends mail from a perl script, otherwise just ignore below:

    open(REPLY, "|/usr/sbin/sendmail -t");
    print REPLY "To: someones_email\@their_domain.com \n";
    print REPLY "From: myname@mydomain.com \n";
    print REPLY "Subject: Auto-mail \n\n";
    print REPLY hello;
    close(REPLY);

  4. #3
    Junior Member
    Join Date
    Nov 2002
    Location
    USA
    Posts
    5
    Member #
    293
    Thanks!

    This works beautifully! So simple, too!
    Code:
    From: myname\@mydomain.com
    I'm taking your advice and ignoring the additional code you provided, lol, because I do not know any perl at all. But, it's really great that you added it, because it will probably help someone else.

    Thanks again!

  5. #4
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    FWIW in the Tutorials forum here there's a sample PHP mailform
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  6. #5
    Junior Member
    Join Date
    Nov 2002
    Location
    USA
    Posts
    5
    Member #
    293
    Thank you, filburt. I just took a look at your tutorial. I'm reading through the "PHP and MySQL for Dummies" book, and I'm sure your tutorial will make more sense to me, after I finish the book.

    Bit by bit, and byte by byte,
    I'm learning to compute, with all my might.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:37 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com