View Single Post
Old 13/06/2018, 02:58 PM   #8
bruxo00
High-roller
 
bruxo00's Avatar
 
Join Date: Oct 2012
Location: Portugal
Posts: 1,120
Reputation: 152
Default Re: SAMPMailJS | Send Emails Easily | HTML |Templates | NodeJS

Quote:
Originally Posted by ByMatt20030 View Post
Thanks for answering!

At first i try with 8.11.3, then i see you make this work on a newer version so i tried with 10.4.1... but still the same problem.
Error code on console at sending email:
Code:
F:\Users\Administrator\Desktop\SA:MP Server\v0.2.3 w/advanced login portal>node sampmail.js
Server running on http://192.168.0.19:7777/
Client (192.168.0.19) requested /sampmail.js?pw=mypassword&action=sendm
================ SENDING EMAIL ================
De: Mail Test
To: myemail@hotmail.com
Subject: test
Text: this works, but doesn't finish the email sending
===============================================
[192.168.0.19] -> 400: Error
samp-server.exe error code:
Code:
[SAMPMAILJS] Server returned a response 400
If necesary to post, i use this includes on that code:
Code:
#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS 100
#include <crashdetect>
#include <sampmailjs>
#include <YSI_Storage\y_ini>
#include <YSI_Data\y_iterate>
#include <YSI_Coding\y_timers>
#include <YSI_Core\y_utils>
#include <YSI_Server\y_flooding>
#include <djson> //later i'll replace this with y_ini... i'm so lazy don't judge me :P
#include <GM_Hooks> //some personal hooks, not more than 3 or 4 simple functions.
#include <yom_buttons>
#include <samp-dl-compat>
#include <Miles> // Some hooks.
#include <fixes>
#include <sscanf2>
#include <streamer>
#include <Pawn.CMD>
#include <NewMenus> //mselection w/ big interface changes
#include <mSelection>   
#include <progressbar>
#include <faderscreen>
#include <AntiCheat>
#define FOREACH_NO_BOTS
#define FOREACH_NO_ACTORS
#pragma option -d3
And Zeex's Pawn Compiler.

Greetings!
Your problem probably is that you probably didn't set up the gmail API correctly. I will do some changes in the future to handle the most basic errors, but for now go to the line 156 of sampmail.js and replace this:

HTML Code:
console.log("[" + req.connection.remoteAddress + "] -> 400: Error");
with this:

HTML Code:
console.log("[" + req.connection.remoteAddress + "] -> 400: Error\n" + err);
And run again and post here the error that will appear. Thanks!
__________________
RELEASES

[INC] SAMPMailJS
[FS] doxIT!
[GM] Paradise City Roleplay
[TOOL] bAnticheat
[TOOL] Logs Checker
[TUTORIAL] Email confirmation system

www.mp3it.cc www.diogomartino.com
bruxo00 is online now   Reply With Quote