Mail/accountgegevens wordt niet verstuurd
Ik zit met het volgende probleem:
Ik gebruik Ubuntu 64 server editie. Met php5 en appache. Als gebruikers een account aanmaken dan wordt er naar bepaalde emaildomeinen geen email verstuurd. o.a hotmail, yahoo, gmail, en co.uk domeinen krijgen de login gegevens niet. zonnet/tele2 ontvangt deze daarintegen wel. Kan iemand mij misschien vertellen of het probleem aan het onderstaande php bestand ligt?
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$message = "This is The Hive's game details, password can be changed under the prefs page inside the game.\r\n\r\n";
$message .= "Username : $acc_name\r\n";
$message .= "Password : $real_pass\r\n";
$message .= "Your referal code is : $refbase\n\r";
$message .= "Use this code to gain a bonus when your friends reach a certain size, they must enter YOUR code in
order for you to get the bonus.\r\n";
$message .= "\r\n\r\nHope you enjoy your stay here at The Hive, Bring your friends and get more action.\r\n\r\n";
/* $message .= "\r\nSlowGame is found at : http://the-hive-hc.servegame.com/SPM-beta\r\n\r\n"; */
$message .= "A manual is online in the game, click the blue 'eyes' at each section and it will give you help about that section.\r\n";
$message .= "The place for the help varies from each skin, but it's usually in the form of a '?' mark on each
section.\r\nThese helptopics are constantly updated to provide you with the most help possible\r\n\r\n";
$message .= "\r\nThe Creators/Admins\r\n\r\n";
$message .= "Find us at http://portal.spaceminers.net\r\n";
include_once("start_mail.php");
$to = $acc_email;
$headers = "From: The Hive Admin <[email protected]>";
$subject = "The Hive password";
$message .= "Username : $acc_name\r\n";
$message .= "Password : $real_pass\r\n";
$message .= "Your referal code is : $refbase\n\r";
$message .= "Use this code to gain a bonus when your friends reach a certain size, they must enter YOUR code in
order for you to get the bonus.\r\n";
$message .= "\r\n\r\nHope you enjoy your stay here at The Hive, Bring your friends and get more action.\r\n\r\n";
/* $message .= "\r\nSlowGame is found at : http://the-hive-hc.servegame.com/SPM-beta\r\n\r\n"; */
$message .= "A manual is online in the game, click the blue 'eyes' at each section and it will give you help about that section.\r\n";
$message .= "The place for the help varies from each skin, but it's usually in the form of a '?' mark on each
section.\r\nThese helptopics are constantly updated to provide you with the most help possible\r\n\r\n";
$message .= "\r\nThe Creators/Admins\r\n\r\n";
$message .= "Find us at http://portal.spaceminers.net\r\n";
include_once("start_mail.php");
$to = $acc_email;
$headers = "From: The Hive Admin <[email protected]>";
$subject = "The Hive password";
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$from = "[email protected]";
$announce_from_name = "The Hive Account creation";
$MP = "/usr/sbin/sendmail -t";
$spec_envelope = 1;
if($spec_envelope)
{
$MP .= " -f $from";
}
$fd = popen($MP,"w");
fputs($fd, "To: $to\n");
fputs($fd, "From: $announce_from_name <$from>\n");
fputs($fd, "Subject: $subject\n");
fputs($fd, "X-Mailer: PHP4\n");
fputs($fd, $message);
pclose($fd);
// echo "<br>Password emailed, check your email in a couple of minutes<br>";
$announce_from_name = "The Hive Account creation";
$MP = "/usr/sbin/sendmail -t";
$spec_envelope = 1;
if($spec_envelope)
{
$MP .= " -f $from";
}
$fd = popen($MP,"w");
fputs($fd, "To: $to\n");
fputs($fd, "From: $announce_from_name <$from>\n");
fputs($fd, "Subject: $subject\n");
fputs($fd, "X-Mailer: PHP4\n");
fputs($fd, $message);
pclose($fd);
// echo "<br>Password emailed, check your email in a couple of minutes<br>";
Het email adres <[email protected]>" is een niet bestaand email adres. Weet iemand een oplossing hiervoor?
De header is als volgt:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<title>The Hive</title>
<?php
// Commented out due to the access problems it causes, temporary fix
// <META NAME="KEYWORDS" CONTENT="games, online games, stradegy games, internet games, webgame, war games, online strategy games,">
// <META NAME="DESCRIPTION" CONTENT="A browser based empire management game set in space. Fastgame is 30 second ticks and slowgame 30 minute ticks.">
?>
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache,must-revalidate">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="Tue, 31 Dec 2010 1:00:00 GMT">
<style>
.note { font: 12px caption; font-weight: bold; text-decoration:none; color: #000000; }
A.note { font: 12px caption; font-weight: bold; text-decoration: none; color: #000000; background: none; border: none; }
.notebody { display:block; border: 1px solid #666666; color: #000000; background: #EEEEEE; position:absolute; z-index: -10; y-index:-100; z-index: -10; width:400px; padding: 2px; left: 10px; font-size: 12px;}
.notetitle { font-weight: bold; background: #CCCCCC; color: #000000; border-bottom: 1px dashed #666666; padding: 1px; width: 100%; margin: 0px; font-size: 13px;}
.notehidden { display: none; }
.notevisible { display: block; position:absolute; y-index: 10; z-index: +100; left:10px;}
.quote {
font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;
background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
</style>
<script language="javascript">
var ie = false;
var lastNote = '';
if (document.all) { ie = true; }
function getObj(id) {
if (ie) {
return document.all[id];
} else {
return document.getElementById(id);
}
}
function showNote(name) {
if (name == lastNote) {
hideNote(name);
return;
}
if (lastNote != '') { hideNote(lastNote); }
var title = getObj(name + '_title');
var body = getObj(name + '_body');
//title.className = 'notehidden';
body.className = 'notevisible';
lastNote = name;
}
function hideNote(name) {
var title = getObj(name + '_title');
var body = getObj(name + '_body');
//title.className = 'note';
body.className = 'notehidden';
lastNote = '';
}
</script>
<!-- END of Post 'Em Notes Header Code -->
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1062857-1";
urchinTracker();
</script>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<title>The Hive</title>
<?php
// Commented out due to the access problems it causes, temporary fix
// <META NAME="KEYWORDS" CONTENT="games, online games, stradegy games, internet games, webgame, war games, online strategy games,">
// <META NAME="DESCRIPTION" CONTENT="A browser based empire management game set in space. Fastgame is 30 second ticks and slowgame 30 minute ticks.">
?>
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache,must-revalidate">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="Tue, 31 Dec 2010 1:00:00 GMT">
<style>
.note { font: 12px caption; font-weight: bold; text-decoration:none; color: #000000; }
A.note { font: 12px caption; font-weight: bold; text-decoration: none; color: #000000; background: none; border: none; }
.notebody { display:block; border: 1px solid #666666; color: #000000; background: #EEEEEE; position:absolute; z-index: -10; y-index:-100; z-index: -10; width:400px; padding: 2px; left: 10px; font-size: 12px;}
.notetitle { font-weight: bold; background: #CCCCCC; color: #000000; border-bottom: 1px dashed #666666; padding: 1px; width: 100%; margin: 0px; font-size: 13px;}
.notehidden { display: none; }
.notevisible { display: block; position:absolute; y-index: 10; z-index: +100; left:10px;}
.quote {
font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;
background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
</style>
<script language="javascript">
var ie = false;
var lastNote = '';
if (document.all) { ie = true; }
function getObj(id) {
if (ie) {
return document.all[id];
} else {
return document.getElementById(id);
}
}
function showNote(name) {
if (name == lastNote) {
hideNote(name);
return;
}
if (lastNote != '') { hideNote(lastNote); }
var title = getObj(name + '_title');
var body = getObj(name + '_body');
//title.className = 'notehidden';
body.className = 'notevisible';
lastNote = name;
}
function hideNote(name) {
var title = getObj(name + '_title');
var body = getObj(name + '_body');
//title.className = 'note';
body.className = 'notehidden';
lastNote = '';
}
</script>
<!-- END of Post 'Em Notes Header Code -->
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1062857-1";
urchinTracker();
</script>
Gewijzigd op 01/01/1970 01:00:00 door Ken
En denk je dat ik 585 regels code door ga spitten? Nee post alleen relevante code maar het klinkt als dat het wordt geblokkeerd door een spam filter.
Is het misschien mogelijk om de spam filter te omzeilen dan?
Ja, dat gaat eenvoudiger als je de juiste headers mee stuurt. Gebruik phpmailer of swiftmailer voor het versturen van emails, dan heb je nooit meer deze problemen!
ar 25 18:43:06 The-Hive-S1 postfix/smtp[4716]: 0613C974131: to=<********@hotmail.com>, relay=mx3.hotmail.com[65.54.245.72], delay=2, status=bounced (host mx3.hotmail.com[65.54.245.72] said: 550 DY-001 Mail rejected by Windows Live Hotmail for policy reasons. We generally do not accept email from dynamic IP's as they are not typically used to deliver unauthenticated SMTP e-mail to an Internet mail server. http://www.spamhaus.org maintains lists of dynamic and residential IP addresses. If you are not an email/network admin please contact your E-mail/Internet Service Provider for help. Email/network admins, please visit http://postmaster.live.com for email delivery information and support (in reply to MAIL FROM command))
Ik heb mijn echte email adres maar even weg gelaten. Zo te zien zal ik de email moeten relayen. Die van mijn isp werkt niet. Weet iemand hier een oplossing voor?
Of heeft je host geen vast ip-nummer?
Quote:
We generally do not accept email from dynamic IP's