28.01.2011, 17:08
This is extremely useful, I might be using this library in a not so far future.
#define MAILER_URL "localhost/mailer.php" #include a_samp #include mailer main() { SendMail( "testemail@hotmail.it", "Test@localhost.com", "Test", "Welcome test", "Message"); }
[mail function] ; For Win32 only. ; http://php.net/smtp SMTP = smtp.tiscali.it ; http://php.net/smtp-portnl674affa69a4002...9smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-fromnl674affa69a...dmail_from = NewGenRP@localhost.com
new szString[300], szString2[500];
format(szString, sizeof(szString), "Important: Your activation password for %s.", SERVER_NAME);
format(szString, sizeof(szString), "Welcome to %s. \n This is your account activation password: %s \n You can come in-game and finish activating your account by entering this password. \n Please do not reply to this message, it will not be read.", GetName(playerid), szString3);
SendMail(inputtext, "no-reply@realcop228.com", SERVER_NAME, szString, szString2);
I keep getting the "Mailer script says: Error: Missing parameters" error...
This is my code: pawn Код:
|
$isSent = mail(...);
if($isSent)
echo 'Mail was accepted for delivery!';
else
echo 'Mail was not accepted for delivery!';
Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise. It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination. |
There's a lot of room for error if it has reached the PHP execution.
What you could do is see what the mail function returns. PHP код:
|
mail(
$isSent = mail(
);
if($isSent)
echo 'Mail was accepted for delivery!';
else
echo 'Mail was not accepted for delivery!';
forward OnMailScriptResponse( iIndex, iResponseCode, const szData[ ] );
public OnMailScriptResponse( iIndex, iResponseCode, const szData[ ] )
{
printf( "Mailer script says: %s", szData );
}