Author Topic: TrailMyx's Emailing routines  (Read 2279 times)

0 Members and 1 Guest are viewing this topic.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 12920
  • Activity:
    0.8%
  • Reputation Power: 150
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1328
  • Referrals: 32
    • View Profile
    • ScriptUO
TrailMyx's Emailing routines
« on: June 10, 2008, 11:55:52 AM »
0
Sometimes it's really nice to email yourself status from a script that's busy doing something nefarious.  For that I use the following tool:

http://www.daveswebsite.com/software/sendmail/

You have to set up an XML file that contains the necessary information to send mail through your particular email server.  Typically, if you use your ISP email address, this seems to work well.  You're on your own if you want to use anything else.  So create an XML file:

Edit: Annoying thing about having XML embedded into the code container below; doesn't work!  So, change the "{" to "<"

Code: [Select]
{Sendmail>
    {Server host="smtp.XXXX.YYYY.net" port="25" username="" password=""/>   
    {Message>
        {Sender email="myemail@server.net" name="EasyUO Daemon"/>
        {Recipient email="mycellphone@att.com" name="YurName"/>
      {Subject>Death Alert{/Subject>
        {Body filename="z:\scripts\message.txt"/>
    {/Message>
{/Sendmail>

The things you need to edit are:
Server host="smtp.XXXX.YYYY.net"
Sender email="myemail@server.net"
Recipient email="mycellphone@att.com"
Body filename="z:\scripts\message.txt"

Make sure you edit this above information in the XML file to be compatible with your email/recipient/body.

This routine creates a message called "message.txt" that contains whatever mesage you want to send.  Be sure that the filename matches the one that your above XML code is expecting.

Code: easyuo
  1. sub SendDeathMail
  2.   set %messagefile z:\scripts\message.txt
  3.   execute cmd.exe /c echo > %messagefile
  4.   execute cmd.exe /c echo >> %messagefile %1
  5.   execute z:\scripts\sendmail.exe z:\scripts\deathmail.xml
  6. return

Finally, you can call this to issue the email from your code:

Code: easyuo
  1. set %text_string #CHARNAME, #spc , died
  2. gosub SendDeathMail NULL %text_string


Hope that's helpful!

TM

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
tool_email.txt
« Last Edit: May 05, 2017, 05:08:35 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline JlM

  • Newbie
  • *
  • Posts: 6
  • Activity:
    0.2%
  • Reputation Power: 1
  • JlM has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: TrailMyx's Emailing routines
« Reply #1 on: October 23, 2018, 06:14:30 AM »
0
This still work? Couldn't get it. I might not be understanding the complexity of setting it up.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 12920
  • Activity:
    0.8%
  • Reputation Power: 150
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1328
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: TrailMyx's Emailing routines
« Reply #2 on: October 23, 2018, 08:44:33 AM »
0
This still work? Couldn't get it. I might not be understanding the complexity of setting it up.

It should still work.  Sadly the link that was setup to download the email server no longer exists.
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: TrailMyx Snippet