AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   Prototype for sending EMails through Sourcemod (working) (https://forums.alliedmods.net/showthread.php?t=105443)

Timiditas 10-04-2009 15:30

Prototype for sending EMails through Sourcemod (working)
 
1 Attachment(s)
See attachment

Uses
[INC] Base64 Encoding and Decoding library functions by SirLamer
Needs
[EXTENSION] Socket by sfPlayer

Usage:
PHP Code:

SendSMTPMail("SMTP hostname/IP"port"username""password""sender email""recipient email""subject""message text"); 

Oops, posted to the wrong subforum, this should have gone to "Snippets"...

Dragonshadow 10-04-2009 19:28

Re: Prototype for sending EMails through Sourcemod (working)
 
Pretty cool!

noodleboy347 10-04-2009 21:38

Re: Prototype for sending EMails through Sourcemod (working)
 
That's awesome, does it work yet?

Timiditas 10-05-2009 03:13

Re: Prototype for sending EMails through Sourcemod (working)
 
Yes, I sent several emails to myself with it.
It doesn't handle unexpected responses from the SMTP server, tho.

Timiditas 10-05-2009 06:07

Re: Prototype for sending EMails through Sourcemod (working)
 
1 Attachment(s)
Try this attached version. It will let you send an email through the server console.

usage: smsendmail "SMTP hostname/IP" port "username" "password" "sender email" "recipient email" "subject" "message text"

enclose every string in quotation marks

Stinkyfax 10-05-2009 15:00

Re: Prototype for sending EMails through Sourcemod (working)
 
ah, that's just awesome feature! :)

seattle_ice 03-18-2012 15:54

Re: Prototype for sending EMails through Sourcemod (working)
 
No matter what I do, I get error 530 back in the logs. ANyone get this working with gmail or hotmail smtp servers?

Peace-Maker 03-18-2012 16:06

Re: Prototype for sending EMails through Sourcemod (working)
 
Are you just trying to use the attached test plugin right out of the box?

Quote:

530 SMTP authentication is required.

You have enabled SMTP authentication for the IP range that the user is connecting from, but the user has not configured his client to use SMTP authentication. There's two ways to solve this problem. Either configure your email client to use SMTP authentication. This setting is normally found in the account settings in your email client. Or, disable SMTP authentication for the IP range. The first solution is recommended since it reduces the risk that anyone will send spam through your server.

seattle_ice 03-18-2012 16:27

Re: Prototype for sending EMails through Sourcemod (working)
 
Quote:

Originally Posted by Peace-Maker (Post 1671422)
Are you just trying to use the attached test plugin right out of the box?

No, but I guess I should ask if this will work with SMTP servers that require either TLS or SSL?

I cannot get this to work for me.

matchaboy 10-18-2013 09:27

Re: Prototype for sending EMails through Sourcemod (working)
 
is it possible if i want to make this in my plugin?

Leonardo 10-19-2013 06:36

Re: Prototype for sending EMails through Sourcemod (working)
 
http://www.sourcemod.net/about.php
>Open-Source
>GNU General Public License

eric0279 09-11-2014 18:54

Re: Prototype for sending EMails through Sourcemod (working)
 
Hello,

Quote:

smsendmail "smtp.gmail.com" "587" "my_username" "my_passwd" "[email protected]" "[email protected]" "subject" "message"
00:51:38 L 09/12/2014 - 00:51:41: [sendmail.smx] Socket extension not found
Quote:

sm exts list
00:51:50 [SM] Displaying 19 extensions:
[01] Automatic Updater (1.6.2-dev+4559): Updates SourceMod gamedata files
[02] Webternet (1.6.2-dev+4559): Extension for interacting with URLs
[03] cURL Extension (1.3.0.0): cURL Extension
[04] SDK Hooks (1.6.2-dev+4559): Source SDK Hooks
[05] BinTools (1.6.2-dev+4559): Low-level C/C++ Calling API
[06] GeoIP (1.6.2-dev+4559): Geographical IP information
[07] Socket (3.0.1): Socket extension for SourceMod
[08] System2 (2.2): System Commands and Information
[09] Builtin Votes (0.5.8): API to do votes using the L4D, L4D2, and Orange Box Valve game in-game vote interface
[10] Config Extension (1.0.2): Wrapper for libconfig
[11] Left 4 Downtown 2 Extension (0.5.4.2): Downtown1's extension to perform useful L4D1/L4D2 calls
[12] DHooks (1.0.12-alpha): Allows basic dynamic hooks
[14] SDK Tools (1.6.2-dev+4559): Source SDK Tools
[15] Regex (1.6.2-dev+4559): Provides regex natives for plugins
[16] Top Menus (1.6.2-dev+4559): Creates sorted nested menus
[17] Client Preferences (1.6.2-dev+4559): Saves client preference settings
[18] SQLite (1.6.2-dev+4559): SQLite Driver
[19] MySQL-DBI (1.6.2-dev+4559): MySQL driver implementation for DBI

friagram 09-14-2014 03:59

Re: Prototype for sending EMails through Sourcemod (working)
 
Since you are requiring the use of socket anyways.. You could just send this to a php page and it use xmailer or whatever, and then add in ssl support. This would require an external service, obviously.

Or... you could just use sql/flatfile (and drop socket) and submit them that way... And have a php script/shell script go through and mail out your messages every few minutes.

checkster 09-16-2014 16:31

Re: Prototype for sending EMails through Sourcemod (working)
 
As much as I like this I also hate this, so lets just say you have my email, or find a way to get the email that i used on my steam. Doubt that can be done.
Then again brilliant to, like if crash or say FgtDetectedOnServer it sends me a email, or for what ever reason.


All times are GMT -4. The time now is 12:37.

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