Jump to content
php.lv forumi

Recommended Posts

Posted

Kas ir noteicošais kādēj un vienu meilu var aizsutīt vēstuli, bet uz citiem nevar?

 

OS:WIN

SMTP SERVER: QK SMTP Server v3.01

PORT: 25

 

Mēģināju sūtīt e-pastu uz

1)"google mail - gmail"

2)"tvnet mail"

3)"inbox mail"

 

SMTP Server uzrāda

1) Connection timed out

2) RCPT error: Helo command rejected: need fully-qualifield hostname.

3) "Meils" nosūtijās

 

Šeit php:

 

<html>
<body>
<?php
function spamcheck($field)
{
$field = filter_var($field, FILTER_SANITIZE_EMAIL);

if(filter_var($field, FILTER_VALIDATE_EMAIL))
{
	return true;
}
else
{
	return false;
}
}

if (isset($_REQUEST['email']))
{
$mailcheck = spamcheck($_REQUEST['email']);
if ($mailcheck==FALSE)
{
	echo "Invalid input";
}
else
{
	$email = $_REQUEST['email'];
	$subject = $_REQUEST['subject'];
	$message = $_REQUEST['message'];
	mail("testsuz@inbox.lv", "Subject: $subject",
	$message, "From: $email" );
	echo "Thank you for using our mail form";
}
}
else
{
 echo "<form method='post' action='mail.php'>
 Email: <input name='email' type='text' /><br />
 Subject: <input name='subject' type='text' /><br />
 Message:<br />
 <textarea name='message' rows='15' cols='40'>
 </textarea><br />
 <input type='submit' />
 </form>";
 }
?>

Posted (edited)

Tā kā ši ir mana pirmā saskarsme ar SMTP serveri, varētu lūgt padomus, ko, ka pareizi nokonfigurēt!

Edited by didy
Posted (edited)

Esi 100% parliecinats ka vainiigs SMTP ??

Parbaudiji ar vienkarshu mail() imantosanu , bez nekaadiem XXX papildus darbiibam ??

---

echo mail('testa@mails.vv', 'subj test', 'Test test');

Ir tapati kljuuda ??

Lielakoties kljuuda ir pasaa PHP kodaa nevis SMTP servera konfigaa ... (ja vien pareizi noraadiis mailserveris [ teiksim mail.balticom.lv ] )

 

Edit: tikai tiko pamaniju --> tev konfigs liiks ....

php.ini

--

[mail function]

; For Win32 only.

SMTP = mail.balticom.lv

smtp_port = 25

----

Un viss ..

nevis

SMTP SERVER: QK SMTP Server v3.01

Edited by Grey_Wolf
Posted (edited)

"SMTP SERVER: QK SMTP Server v3.01" bija nevis php.ini konfigs bet vienkarsi norade kadu serveri izmantoju!

Paldies pa to pasu!

 

php.ini

[mail function]

; For Win32 only.

SMTP = 00.00.00.00 - ieliku IP

 

Varu nosutiit meilus ne tikai uz inbox. Bet joprojam uz gmail uzrada Connection timed out

 

Edidt: Skiet ka uz .lv iet bet uz .com meili neaiziet

Edited by didy
Posted

kapēc ieliki 00.00.00.00 IP? vaitad localhost, jeb 127.0.0.1 nevajadzēja un izmēģināji Grey_Wolf piemeru? Mosh tev tur isp kko liedz. SMTP serverim bija janorada dns serveris, mosh noradi kadu citu! nic.lv apskaties, tur kkads bija! :)

Posted (edited)

ti tiesam kapeec IP ??

Vai tad mailera programmas arii noraadi IP ??

Vai tomer mailservera nosaukumu ???

Kaa jau mineeju parasti mail.tavs_provaideris.lv ...

Nu vari kautvai pamegjinat mail.balticom.lv / mail.latnet.lv --> galu galaa paskaties Kads ir Tava Provaidera mailserveris ...

 

edit: aa nu jaa, ja izmanto pats savejo tad protams IP , bet tad tev pareizi jakonfigure savs mailserveris (un saubos vai vispar to izmanto ) ...

Un galiigi nesaprotu prieks kam uz Win masinas savu mailserveri...

Edited by Grey_Wolf
×
×
  • Create New...