WebFaction
Community site: login faq

I'm trying to set up a simple standalone page on my site to test the Dagon Design Secure PHP Form Mailer.

Ultimately, the goal is to help a local non-profit publication solicit photos from their aging readership.

At the moment, I get the "Error sending message!" error message when I try the form. In the comments for the form, the scripter says:

If you believe you can use the PHP mail function and have already tried a different email address, create a small PHP file with the following contents (be sure to use your own email address):

<?php mail('you@domain.com', 'test subject', 'test message'); ?>

Open the file in your browser and then check your mail. If you did not receive the message, something is not set properly on your server, and the trouble is not with this script. Even if other mail scripts work for you, that does not mean this one will, as there are several methods to send mail in PHP.

I've created this tiny file, here, but nothing happens when I open it in my browser (by typing the address directly into the address bar). I've obviously replaced the mail address in the little script with my own e-mail address.

I'm obviously still learning about this stuff, and probably will need to learn a lot more before I'm done. But for right now: is there something I should configure to make this little mail test script work?

asked 30 Aug '12, 15:23

mattshepherd
4541830
accept rate: 0%

edited 30 Aug '12, 15:38


E-mails using the PHP send function need the 'From:' address properly filled out.

You may submit a support ticket if you would like us to check if this is why it is failing, we also have access to other logs we could investigate.

permanent link

answered 30 Aug '12, 17:47

johns
5.4k312
accept rate: 23%

I've tried looking this up, and the following: <?php $to = 'matt@shep.ca'; $subject = 'Testing'; $message = 'This is a test'; $headers = 'From: matt@shep.ca' . "rn" . 'Reply-To: matt@shep.ca' . "rn" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?>

I'll submit a support ticket, but frankly, I feel guilty about it. You guys have better things to do than prop up a numpty.

(30 Aug '12, 18:54) mattshepherd
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×262
×69
×25

question asked: 30 Aug '12, 15:23

question was seen: 4,264 times

last updated: 30 Aug '12, 18:54

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM