Unable to send mikrotik backup file to email address

I tried by several ways but failed to send my mikrotik backup file to gmail account.

I can send test mail to gmail account.

but whenever I tried to do it by script then failed.

  1. On script:

name: email
source:
/system backup save name=email;
/tool e-mail set address=74.125.129.108 from=xxx@gmail.com user=“xxx@gmail.com” password=xxxx
/tool e-mail send to=“zzz@gmail.com” from=xxx@gmail.com subject=([/system identity get name]." backup") file=email.backup; :log info “Backup e-mail sent.”;

from this line if i click on run script then it backup the data. but no mail was sent.


\

  1. if it is successful then I need to do it by automatically.

Any one can give me the fully solution how to send backup file to email address.

tls=yes port=587

YES i did it. I told my test email is working but when i tried to do it by script then it is not working.

Is there a requirement that you’re specifying the email settings everytime that you’re running that script? Take the line out for /tool email, you only need to do it once.

If it works with the command line, but not the scheduler, it is a policy issue. Last I checked, the script must have the “test” policy and the same with the scheduler.

/system script
print

/system scheduler
print detail