sending email from a form on my site?

Status
Not open for further replies.

pmcmurrough16

New Member
Messages
13
Reaction score
0
Points
0
Hi,

Can anyone tell me what I need to configure to be able to send email from a form on my site (e.g. a forgot password form etc)

I assume that I need to configure the location and authentication details of an SMTP server? (or am i really showing my age here - that's the way we did it in the old days).

Thanks,

P
 

farscapeone

Community Advocate
Community Support
Messages
1,165
Reaction score
27
Points
48
You don't need to configure anything. You just need a PHP (or any other language that supports sending emails) function.

I use something like this:


PHP:
$to = "your@email.com";
$subject = "YOUR SUBJECT";
$body = "YOUR EMAIL TEXT";
$headers = "YOUR HEADERS"; /* optional */
if (mail($to, $subject, $body, $headers)) {
  echo "OK";
} else {
  echo "ERROR";
}
 

pmcmurrough16

New Member
Messages
13
Reaction score
0
Points
0
Thanks mate, i have tried that but I am getting the following msg on my x10.bz email account

550-outgoing.x10hosting.com [173.236.28.162] is currently not
permitted to....

This is why I thought I was missing some setup somewhere.

Thanks,

Paul
 
Status
Not open for further replies.
Top