Raised This Month: $ Target: $400
 0% 

Email Module?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 06-25-2006 , 11:59   Re: Email Module?
Reply With Quote #5

i wrote a function months ago, but it doesn't work like it should.
I would fix it, but i don't have time for it atm.
here is it:
Code:
sendMail( server[], port, to[], from[], subject[], text[] ) {     static buff[1024];     static socket;     static error;     static len;         socket = socket_open( server , port, SOCKET_TCP, error );     if( error )         return error;             len = format( buff, 1023, "HELO %s^r^n", server );     socket_send( socket, buff, len );     log_amx( ">> LEN %i <<", len );         len = format( buff, 1023, "MAIL FROM:<%s>^r^n", from );     socket_send( socket, buff, len );     log_amx( ">> LEN %i <<", len );         len = format( buff, 1023, "RCPT TO:<%s>^r^n", to );     socket_send( socket, buff, len );     log_amx( ">> LEN %i <<", len );         len = format( buff, 1023, "DATA ^r^n" );     socket_send( socket, buff, len );     log_amx( ">> LEN %i <<", len );         len = format( buff, 1023, "SUBJECT: %s^r^n%s^r^n.^r^n", subject, text );     socket_send( socket, buff, len );     log_amx( ">> LEN %i <<", len );         socket_close(socket);         return 0; }

i added the log_amx() to debug it

Last edited by Greenberet; 06-25-2006 at 12:05.
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode