Junos Automation (Scripting)
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 193
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.

JNCIA-Junos
Recognized Expert
Posts: 325
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: 193
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

JNCIA-Junos
Contributor
Posts: 193
Registered: ‎03-24-2014
0 Kudos

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

No one has an answer, so is there any way in SPACE to add say postfix, or something that will relay my EX smtp message?

JNCIA-Junos
Recognized Expert
Posts: 325
Registered: ‎10-04-2012
0 Kudos

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

Hi, 

 

I don't think that Space has that ability.

 

Regards,

Andy