mail settings

Status
Not open for further replies.

yabizon34

New Member
Messages
4
Reaction score
0
Points
0
how could i use mail sending on my site? should i use php mail() function or should i do it via smtp?
 

Smith6612

I ate all of the x10Pizza
Community Support
Messages
6,517
Reaction score
48
Points
48
The PHP Mail function will work, SMTP should also work as well.
 

yabizon34

New Member
Messages
4
Reaction score
0
Points
0
thanks for so quick response
i have problem with sending mail, i have tried mail() and smtp using my own smtp settings but it is not working

---------- Post added at 10:23 PM ---------- Previous post was at 10:20 PM ----------

my send mail function looks like

function m_sendmail_mail($to,$subject,$mailbody,$from_name){
$from = $config["smtp_from"];

$headers = "Content-type: text/html; charset=windows-1251 \r\n";
$headers .= "From: $from_name <$from>\r\n";
$headers .= "Reply-To: $from\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();

mail($to, $subject, $mailbody, $headers);
}

it shoul be ok, i think
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
$from = $config["smtp_from"];

$from will be empty (where did you get $config ?)
You should also test the return value of mail().
$from should be set to an email attached to your domain. Otherwise, the outgoing filters might block it as spam.
Lastly, Yahoo and Hotmail have blacklisted mail from the x10 mailserver due to spamming by some users. They are trying to get Y & H to understand that there are thousands of legit users here, but I don't think they have succeeded yet.
 
Last edited:

yabizon34

New Member
Messages
4
Reaction score
0
Points
0
hello,
i have created test php script for testing mail now
http://bizon.x10.bz/test.php

i have hardcoded all the vars

PHP:
$from_name="admin";
$from = "admin@bizon.x10.bz";
$to="zzma@inbox.ru";
$mailbody="test message";
$subject="test from new host";

$headers  = "Content-type: text/html; charset=windows-1251 \r\n";
$headers .= "From: $from_name <$from>\r\n";
$headers .= "Reply-To: $from\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();

$resp = false;
$resp = mail($to, $subject, $mailbody, $headers);

print $resp;

but i do not get any response, $resp is not printed.

i have looked in some similar posts and have found that for mail() working i need to have intermediate php configuration, how can i check what php configuration i have? and how can i turn intermediate php configuration on?
 

yabizon34

New Member
Messages
4
Reaction score
0
Points
0
hello

now i have created test php script for mail testing

i ahve hardcoded all the vars, from and to
php code is following:


$from_name="admin";
$from = "admin@bizon.x10.bz";
$to="zzma@inbox.ru";
$mailbody="test message";
$subject="test from new host";

$headers = "Content-type: text/html; charset=windows-1251 \r\n";
$headers .= "From: $from_name <$from>\r\n";
$headers .= "Reply-To: $from\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();

$resp = false;
$resp = mail($to, $subject, $mailbody, $headers);

print $resp;


but i did not get any response, $resp is empty and is not printed.

i have had a look into other similar posts in this forum and have found that for mail() working i need to have intermediate php configuration, how can i check if i have that one? and if not, how could i set up intermediate php configuration?
thanks.
 
Status
Not open for further replies.
Top