Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Formmail "Sorry I can't send to" problem

Discussion in 'E-mail Discussion' started by mike100, Apr 28, 2002.

  1. mike100

    mike100 Member

    Joined:
    Oct 8, 2001
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    301
    Formmail "Sorry I can't send to" problem

    Hello,

    I am trying to use /cgi-sys/FormMail.cgi on a domain (not tried it on other domains) to send an email to orders@domainname.com (obviously replace &domainname.com& with the actual domain) but keep getting this error:

    Sorry I can't send to domainname.com. Is domainname.com on this server ?

    I can't find any way to get this to work. Anyone help?
     
  2. Daniel

    Daniel Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    165
    Likes Received:
    0
    Trophy Points:
    316
    Make sure the domain name is in /etc/localdomains.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. hst

    hst Well-Known Member

    Joined:
    Feb 24, 2002
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    316
    be sure to include a required field named email

    The form needs to include a field named email for the submitter to fill in or it will be blocked. Also the email address needs to be the same one @domain.com of the hosting account domain name.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. feldon27

    feldon27 Well-Known Member

    Joined:
    Mar 12, 2003
    Messages:
    119
    Likes Received:
    13
    Trophy Points:
    168
    Location:
    Houston, TX
    I think I am going to have to produce a page/guide "Walking through Minefields: Customizing cPanel". :rolleyes:

    Ok, Matt's formmail.pl 1.92 script will work with the following steps:

    1. Change:

    $mailprog = '/usr/bin/sendmail -i -t';
    to
    $mailprog = '/usr/sbin/sendmail -i -t';


    2. Remove (most important and took me a LONG TIME to figure out):

    open(MAIN,"/etc/domains") || die $!;
    @main = <MAIN>;
    close(MAIN);


    I tried several ways to get this to work including changing it to /etc/localdomains with no results. Ripping out the whole section makes the script work, since we have @referrers to protect us from spam.


    3. Fill in:

    @referers = ('serenescreen.com');
    as needed, putting a comma between each 'quoted' entry.


    4. Upload

    formmail.pl
    to
    /home/%user%/public_html/cgi-bin/ (%user% is your username)


    5. CHMOD formmail.pl to 755.


    You should now be able to call /cgi-bin/formmail.pl normally according to the instructions at Matt's script archive.

    Say what you will about Matt's script, but I think it is vastly superior.

    - It provides the results in the correct order.
    - It can be easily configured to send HTML.
    - It is 29kb instead of 512kb.
     
    #4 feldon27, Mar 18, 2003
    Last edited: Mar 18, 2003
  5. feldon27

    feldon27 Well-Known Member

    Joined:
    Mar 12, 2003
    Messages:
    119
    Likes Received:
    13
    Trophy Points:
    168
    Location:
    Houston, TX
    I went thru chown, chgrp, and various fun and games before realizing that the script was not allowed to read /etc/localdomains. See instructions in post above!
     
    #5 feldon27, Mar 18, 2003
    Last edited: Mar 18, 2003
  6. tedfeely

    tedfeely Member

    Joined:
    Mar 26, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    51
    Solution to "Sorry I can't send to" problem

    Using your cPanel account, create a Forwarder that receives email at your domain (e.g., email-name@your-domain-name.com) and that forwards the email to the 3rd party email service (e.g., email-name@gmail.com).

    Create a form that sends to your domain (e.g., email-name@your-domain-name.com). The email will then be forwarded to the 3rd party address you are forwarding email to.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice