test email not working with gmail

I am trying to send a test email via gmail and do not receive anything.

From terminal I type:

send subject=“test” body=“test” to=tom.waterloo@gmail.com



Email is setup as follows:

[admin@MikroTik] /tool e-mail> print
server: 209.85.225.18:465
from: “Tom Mikrotik”
username: “tom.waterloo@gmail.com
password: “Mypassword”


Any ideas? Thanks, and of course Mypassword is an alias for my real password since I don’t want the whole world to know what it is.

I would try port 25. Email servers normally deliver email to port 25. I show gmail smtp severs as 74.125.xx.xx.

gmail’s SMTP server doesn’t use port 25 if I remember correctly. You’ll have to look up their documentation to see what port to use.

RouterOS cannot use SSL/TLS for email, which is required to send through gmail. So as far as I know you cannot use gmail to send emails from RouterOS.

My email server delivers email to gmail.com using port 25. If you are using an email client with gmail (like outlook or thunderbird), that is the port (edit: port 465) you would use to send email to outside addresses.

@fewi: that is true if the destination address is not local.

ADD: try this address for gmail email server. It worked for me. 74.125.47.27
@tomwaterloo: You should have a test email from me (my router using “/tool e-mail” actually) in your inbox if my log is correct.

server: 74.125.47.27:465
from: “Tom Waterloo”
username: “tom.waterloo”
password: “mypassword”

server: 74.125.47.27:25
from: “Tom Waterloo”
username: “tom.waterloo”
password: “mypassword”

tried both of these and neither could send a test message. any other ideas?

Leave off the username and password, change the from to something that isn’t @gmail.com - as Tim points out at that point you should be able to send to @gmail.com addresses (but not to other domains).

Did you check your email?
From info (at) wififoryou.com
Subject: test
Body: test

I used the ip I posted as the email server. I had no username or password entered.

server: 74.125.47.27:465
from: “Tom Waterloo”
username: “”
password: “”


Does not work. and does not work with port 25.

Does anyone have notifications being sent through Gmail smtp servers? If so, what are your email settings.

Thanks,

Surfer Tim,

I did receive the test email from you. Not sure why it works for you but not for me.

Tom

You are about to get a second test. I used this for the entries:
server: 74.125.47.27
from: test (at) wififoryou.com
username = “”
password = “”

Replace the (at) with @, of course. I don’t like email spiders.

[admin@MikroTik] /tool e-mail> print
server: 74.125.47.27
from: “test@wififoryou.com
username: “”
password: “”


Still does not work for me? Any ideas?

Here is mine:

[admin@test] /tool e-mail> print
    server: 74.125.47.27:25
      from: "test@wififoryou.com"
  username: ""
  password: ""
[admin@test] /tool e-mail> send to=tom.waterloo@gmail.com subject=test body="test3 from SurferTim"

It does work and has been working after all. Gmail has been putting my test emails into spam.

Thanks,

Good to hear it works. A couple (edit: ok, a few) things to insure your email gets through if you use a service that filters spam:

  1. Use a valid ‘from’ address. Most email servers will trash anything with a malformed ‘from’ address.
  2. Put the ‘from’ address in your address book or friends list.
  3. Don’t send a lot of emails in a row. Some email servers will delay accepting the email from the same address (edit: and to the same address) too many times in a row.

ADD: My email server is stricter than this. It is set to reject any email if it cannot resolve the domain of the sender.

Hi to everyone,

I’m experiencing the same problem as tomwaterloo, and did all of the modifications as SurferTim said, but no luck. I’ve tried with this configuration:

[admin@MKTStation] > tool e-mail print
    server: 74.125.65.109:465
      from: "<andrescamino@gmail.com>"
  username: "andrescamino@gmail.com"
  password: "mypassword"

also with

[admin@MKTStation] > tool e-mail print                                               
    server: 74.125.65.109:25    
      from: "<andrescamino@gmail.com>"
  username: "andrescamino@gmail.com"
  password: "mypassword"

and trying to send emails to my other personal account with this line

[admin@MKTStation] > tool e-mail send to=andres_camino@hotmail.com subject=test bod
y="this is a test"

also to other accounts but still no luck…i’m pretty sure the router has internet access and can reach the ip address of the gmail smtp server…can you give some guidance of how to set this up in the right way…i’ve also waited for an hour to receive mails, also looked into the spam folder…but nothing happens, can you give some guidance?

Thanks

I’ve not had very good luck with the gmail server unless you are sending the email to a gmail address. Then I use port 25. I posted a response to your other thread. Take a look at the wiki about setup. like the log setting.
http://wiki.mikrotik.com/wiki/Email_setup/troubleshooting

If you use gmail (it is secure on port 465), you need to use this:
/tool e-mail send to=yourname@hotmail.com subject=“test” body=“test” tls=yes
Requires V4.X

Hi SurferTim

Thanks a lot…it actually works sending from a gmail account to another gmail account…

I have another question…I used port 25 and whenever i want to send this to another accout

/tool e-mail send to=yourname@hotmail.com subject="test" body="test" tls=yes

i can’t writ the TLS it is like it is not valid by the RouterOS, and i have the RouterOS version v4.3
what could happen?

I don’t know exactly when the tls feature appeared. I would upgrade the OS to v4.10 or 4.11 and try it again. And use port 465 if you use tls=yes

When I got this working the messages were sent to spam. Check your spam box at gmail. IF the message is there, set up a contact with the return address of the message.