Sending Mail from Contact Form?

ineedshi

New Member
Messages
1
Reaction score
0
Points
0
Hello. I'm a free user attempting to send mail using the PHP mail() function in my script.

My script itself doesn't hold errors.

Is there anything I need to set (perhaps the mail server value in php.ini) before attempting to do this? I've already created a mail account in cPanel.

Any guides? If you need any other info, let me know. Thanks!
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
You haven't posted any code (a big no-no), but I am willing to go out on a limb here and guess that you are trying to set the From header to the email address the user entered on your form. You aren't allowed to do that here. Any outgoing mail that is not from an existing account associated with your hosting account will be silently discarded by an outgoing spam filter. You can, however, set the ReplyTo header if you want to be able to reply directly to the message from your own email account.

As an aside, I have absolutely no idea what the fascination is with mailing user contact info to an email account for handling. Why not simply save it in your application where it will be accessible to your entire team, and you can track the status, classify the query and statistically analyze for patterns (maybe you need to create a new FAQ or to clarify your wording/documentation somewhere, or maybe there is a large and identifiable segment of your user population that needs a feature you don't have, and adding that feature could get you a lot of users in some industry you weren't even thinking about). It's a whole lot easier to do that in a custom application than it is in an email account that contains mostly free-form text, much of which concerns methods for enlarging your genitalia and polite letters from the spouse of a recently-assassinated corrupt head of a branch of government in a troubled foreign country. You can always reply to the user from your account, using a form in the application, and have boilerplate answers, snippets, standard signatures for all of your team, etc.
 

erhalo

New Member
Messages
36
Reaction score
0
Points
0
there are a lot of .php mailing scripts out there go to dream in code. com that will help a lot
 
Top