[Include] My Mailer Include
#21

This is extremely useful, I might be using this library in a not so far future.
Reply
#22

Quote:
Originally Posted by costel_nistor96
View Post
Nice Include ... but: Why i get "Error: Missing parameters." in the .php file ?
Same question
Reply
#23

Your function dont understand when i put a string into the SendMail
It say missing parameters
Reply
#24

I need that include too much, can someone upload it?
Please?
Reply
#25

Quote:
Originally Posted by Larceny
View Post
I need that include too much, can someone upload it?
Please?
The links are in the first post.


Quote:
Originally Posted by Stormz
View Post
Your function dont understand when i put a string into the SendMail
It say missing parameters
Don't leave any arguments as empty strings - it won't work.
Reply
#26

Lol, this could be abused perhaps as a email bomber? Correct me if I am wrong, I find this really interesting. Thanks alot buddy =D
Reply
#27

That's probably why Slice isn't hosting the script himself - whoever uses this include needs to host the PHP file themselves, and I presume most of them will try hide the file for security.
Reply
#28

Quote:
Originally Posted by Slice
View Post
The links are in the first post.
Thank you.
Reply
#29

I'm trying to got used to this mailer inc but i've some problem.
First, i need to run it on a local server for test, so i done a little script to test the include using apache installed on my pc.
Code:
#define MAILER_URL "localhost/mailer.php" 

#include a_samp

#include mailer

main()
{
    SendMail( "testemail@hotmail.it", "Test@localhost.com", "Test", "Welcome test", "Message");
}
Then i tried to configure the smtp on xampp changing php.ini as follow:
Code:
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.tiscali.it 
; http://php.net/smtp-portnl662dd493340d03...6smtp_port = 25 

; For Win32 only.
; http://php.net/sendmail-fromnl662dd49334...dmail_from = NewGenRP@localhost.com
I don't get i sendmail_from is related to ISP, so i need to have a "email@tiscali.it" to correct send the mail?
If i run the script nothing happens, no warning on the console.

P.S. Sorry for the bumping, but I can't find nothing over the internet :P
Reply
#30

Hi

I have a little webspace with a SMTP server. Where should I fill in the password ?

Simon
Reply
#31

its quit advance for me but...your releases are always awesome so great..!

and yeah if you get some couple of time please help me in this to sort out things..!
Reply
#32

I keep getting the "Mailer script says: Error: Missing parameters" error...

This is my code:

pawn Код:
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);
Could someone tell me why this would be?
Reply
#33

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
I keep getting the "Mailer script says: Error: Missing parameters" error...

This is my code:

pawn Код:
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);
Could someone tell me why this would be?
You're formatting "szString" twice, and haven't formatted szString2.

I doubt that'll be the problem though, just replace the include again with this current one.
Reply
#34

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
You're formatting "szString" twice, and haven't formatted szString2.

I doubt that'll be the problem though, just replace the include again with this current one.
I just downloaded the include when I went to use this system. I'll see what happens though. Thanks!
Reply
#35

Okay, small update: I am attempting to use this include to send me an email each time my server is loaded. I have the "SendMail" function under "main()" and I am receiving no errors in the server console. I never receive the email though. What could be causing this?

Permissions on the mailer.php file are 644 on a Linux ran web-server.
Reply
#36

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 код:
$isSent mail(...);
if(
$isSent)
    echo 
'Mail was accepted for delivery!';
else
    echo 
'Mail was not accepted for delivery!'
If it was accepted for delivery, then as the PHP manual says, the mail still might not reach its destination. There are a lot of things that could be wrong: PHP mailserver settings, it could get stuck in spam filters, etc.
Quote:

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.

Reply
#37

Quote:
Originally Posted by AndreT
Посмотреть сообщение
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 код:
$isSent mail(...);
if(
$isSent)
    echo 
'Mail was accepted for delivery!';
else
    echo 
'Mail was not accepted for delivery!'
If it was accepted for delivery, then as the PHP manual says, the mail still might not reach its destination. There are a lot of things that could be wrong: PHP mailserver settings, it could get stuck in spam filters, etc.
Could you tell me exactly where to place that piece of code? I have no clue what I'm doing when it comes to PHP.
Reply
#38

Replace
PHP код:
mail
with
PHP код:
$isSent mail
and after the last line:
PHP код:
); 
add:
PHP код:
if($isSent
    echo 
'Mail was accepted for delivery!'
else 
    echo 
'Mail was not accepted for delivery!'
Reply
#39

Quote:
Originally Posted by AndreT
Посмотреть сообщение
Replace
PHP код:
mail
with
PHP код:
$isSent mail
and after the last line:
PHP код:
); 
add:
PHP код:
if($isSent
    echo 
'Mail was accepted for delivery!'
else 
    echo 
'Mail was not accepted for delivery!'
Okay, done. Where on earth can I find the results? This is on a shared hosting account at Volt Host using cPanel.
Reply
#40

In such case you should look in the server log.
pawn Код:
forward OnMailScriptResponse( iIndex, iResponseCode, const szData[ ] );
public  OnMailScriptResponse( iIndex, iResponseCode, const szData[ ] )
{
    printf( "Mailer script says: %s", szData );
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)