Community discussions

MikroTik App
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 250
Joined: Fri Apr 25, 2008 6:52 pm

Sending e-mail to hotspot users manually; How to?

Fri Jul 30, 2010 2:02 pm

Is it possible to send e-mails with login details to users manually?

The e-mail is being send automatically when somebody sings up online.

But if I add a user manually, how can i send e-mail to that user?

is there a command or a script which I can use to tell User-manager to send the e-mail to user.
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: Sending e-mail to hotspot users manually; How to?

Sun Aug 01, 2010 4:08 am

You could use the built-in
/tool e-mail send
command from within RouterOS to send email to a user.
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 250
Joined: Fri Apr 25, 2008 6:52 pm

Re: Sending e-mail to hotspot users manually; How to?

Sun Aug 01, 2010 10:20 am

ok, but with which command will I get user data from user-manager?

(username, password, money paid, prepaid time...etc..)
Because this e-mail should contain user data.
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: Sending e-mail to hotspot users manually; How to?

Sun Aug 01, 2010 9:53 pm

imaljko4,
You can send anything in the body of the e-mail message.

Ex. To send User Manager data, try something like this:
First, configure all settings in: /tool e-mail.
:local useremail "";
:local emailmsg "";

/tool user-manager user {
   :foreach u in=[find] do={
      :set useremail [get $u email];
      :set emailmsg ("User " . [get $u first-name] . " " . [get $u last-name] . "\n");
      :set emailmsg ($emailmsg . "Username: " . [get $u name] . "\n");
      :set emailmsg ($emailmsg . "Password: " . [get $u password] . "\n");
      :set emailmsg ($emailmsg . "Credit-Left: " . [get $u credit-left] . "\n");

#    you may need tls= if server requires it
      /tool e-mail send to=$useremail body=$emailmsg;
   }
}
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 250
Joined: Fri Apr 25, 2008 6:52 pm

Re: Sending e-mail to hotspot users manually; How to?

Mon Aug 09, 2010 12:57 pm

thank you!

Can you give me a link where i can find all the parameters that I am able to input to get user- manager data.

I am using userman-test 4.10

Thank you
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: Sending e-mail to hotspot users manually; How to?

Mon Aug 09, 2010 8:02 pm

The Wiki has some documentation on User Manager v4 test:
http://wiki.mikrotik.com/wiki/User_Manager, however it doesn't look completed yet. It should get you started though.

Also, at the console if you type: /tool user-manager then press the <TAB> key, you'll get a list of sub-menus and properties you can query (aka include in your email message).

Hope this helps.
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: Sending e-mail to hotspot users manually; How to?

Mon Aug 09, 2010 10:15 pm

Open Usermanager, find client.
Highight email-address. Ctrl-C.
Open email program, click New Message, Ctrl-V.
Click Send ?

Who is online

Users browsing this forum: No registered users and 41 guests