Junos Automation (Scripting)
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 185
Registered: ‎03-24-2014
0 Kudos

How do I add SSL to a email in SLAX

    version 1.1;

    ns curl extension = "http://xml.libslax.org/curl";

    param $server;

    match / {
        <out> {
            var $info = {
                <method> "email";
                <server> $server;
                <from> "muffin@example.com";
                <to> "phil@example.net";
                <subject> "Testing...";
                <contents> "Hello,
    This is an email.  But you know that.

    Thanks,
     Phil
    ";
            }

            var $res = curl:single($info);
            <res> {
                copy-of $res;
            }
        }
    }

 

In the above script, I want to add a username and password, and maybe a smtp port, so I can test on another smtp server.

This is related to not seeing the body in the emails, sent from our corporate Office 365 cloud server.

Recognized Expert
Posts: 319
Registered: ‎10-04-2012

Re: How do I add SSL to a email in SLAX

I've not tried this with authentication before, but have you tried just adding a password parameter?

 

http://juniper.github.io/libslax/slax-manual.html#password

 

Regards,

Andy

Highlighted
Contributor
Posts: 185
Registered: ‎03-24-2014
0 Kudos

Re: How do I add SSL to a email in SLAX

Andy,

 

I also found the username and password syntax, but clueless on the ssl or ttl port settings. Still trying to resolve the 

<content> problem.

 

Thanks

Tom