Cannot send email from form

Discussion in 'Free Hosting' started by sykopath, Feb 19, 2016.

  1. sykopath

    sykopath New Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I have a user fillable form on my site, an i was able to send email from it just once, now it does not work. Can anyone help me figure out why it is not working?

    thank you its currently hosted at http://http://sykopath.x10host.com/Contact-Us/
     
  2. erniehan

    erniehan New Member

    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    I am trying to perform the same task. Have not been able to make it work once. is there a path name or setting that has to be changed? in cPanel there is the following path:
    Path to sendmail /usr/sbin/sendmail

    Must I add this somewhere?
    I am using the following code in PHP:

    $to = "ernie_hansen@xxxxxxxx.net";
    $subject = "TEST";
    $message = "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ";
    $header = "bcc:ernie_hansen@xxxxxxxx.net\r\n";
    $mailsend = mail($to,$subject,$message,$header);

    Like your domain name. Cool! Should I use PHPBB? if so how?
     
  3. essellar

    essellar Community Advocate Community Support

    Messages:
    3,295
    Likes Received:
    227
    Trophy Points:
    63
    Emails that just say "test" or that don't have a message content that looks like message content (or that look exactly like a spam pattern) are silently discarded by the outbound spam filter. Try a test message that looks real.
     
  4. erniehan

    erniehan New Member

    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    I have seen in other posts that I may need to upgrade my version of php. Is that true?
     
  5. essellar

    essellar Community Advocate Community Support

    Messages:
    3,295
    Likes Received:
    227
    Trophy Points:
    63
    No. Changing your PHP version (which would be a downgrade, not an upgrade) is sometimes necessary to use code that has since been deprecated or removed from PHP, such as when you're using a very old script. PHP's mail() function works as expected in the default version on the Free Hosting servers.
     
  6. erniehan

    erniehan New Member

    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    I want to thank you for your help. I have a few questions. When the next version of php is installed, will my code still work? What URL can I go to, to find what the latest version of php will have? Yes, My code works. I added a "From:" to the header and it worked. I am being blocked at the receiving end. I was sending the email to my Yahoo account and it never arrived. I changed the "to" address to my 10X account and it worked fine. Another puzzle. Why is it blocked at Yahoo?

    Again Thanks very much for your help. I really appreciate your responses.
     
    Last edited: Feb 22, 2016
  7. caftpx10

    caftpx10 Well-Known Member

    Messages:
    1,531
    Likes Received:
    114
    Trophy Points:
    63
  8. erniehan

    erniehan New Member

    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Thank you, caftpx10. I discovered that I can send email within my own x10 domain. However if I send to my Yahoo or Gmail accounts, the email fails to appear. I surmise from this that the x10 domain may be blocked. Have you had similar experiences? Would appreciate hearing about any experiences you have had. Thank you for your reply.
     

Share This Page