Re: aubit + e-mail

"Simenes ." <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <[email protected]>
ok

i take a look but i did not find  lib/extra_libs/libsmtp ...i have found just aubit4glsrc/lib/extra_libs/smtp/... and there is a test_smtp.4gl that i tryed it...

it compiles perfectly...but when i try running it, i get the error below:

41 /home/simenes> ./test_smtp.4ae
Err:Program ./test_smtp.4ae stopped at 'test_smtp', line number 1.
Error status number -30231.
Unable to load shared library file.

4gl function call stack :
    MAIN

i could note that this error occurs because these LETs :
LET lv_message=fgl_smtp::start_message("[email protected]","Another New Test Message")
LET lv_mainpart = fgl_smtp::mime_type_new(lv_message,0,"multipart/mixed")
LET lv_textpart = fgl_smtp::mime_type_new(lv_message,lv_mainpart,"text/plain")
LET lv_pdfpart=fgl_smtp::mime_type_new_with_description(lv_message,lv_mainpart,"application/pdf","m1.pdf")

i tryed take it out, and it does not get errors...but it does not do anything too (off course)...

whats share library does the aubit are trying to call...?

NOTE: i already install libsmtp as max says


Date: Fri, 2 Mar 2012 15:31:00 +0000
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [Aubit4gl-discuss] aubit + e-mail

Opps - hit the wrong key ..
There is the libsmtp as Max says - see lib/extra_libs/libsmtp for an Aubit4GL wrapper around it.

There is no reason why you should need "aubit4gl native" for anything though - as you can always drop to C and use any library you want...


On 2 March 2012 15:29, Mike Aubury <[email protected]> wrote:

There is the limsmtp library as Max says -  

On 2 March 2012 15:23, KLRUMPF <[email protected]> wrote:



  
    
  
  
    If you go through just calling mail on Linux perhaps use the
    heirloom 

    flavour of mailx sendmail and do something like 

    let runcmd= "cat sendplisttxt.html | /usr/sbin/sendmail -t"

    if you want to do attachments multipart etc etc

    

    The unfinished html looks like this, I out****ed the http links

    

    ****start html****************************

    

    <!DOCTYPE html><html
    xmlns="http://www.w3.org/1999/xhtml">

    <head> <meta content="text/html; charset=iso-8859-1"
    http-equiv="content-type" />
    <title>sendplisttxt.html</title> </head>

    

    <body>

    

    <p><span style="font-family: Arial;">DUMMYTEXT
    <br> <br>

    

    your bla bla  <BR><BR>

    

    

    With kind blabla, ****************** <br><br>

    

    <!-- <a href="***************" target="_blank">Facebook
    </a> &nbsp; &nbsp; -->

    <!-- <a href="***************" target="_blank">Twitter
    </a><br> -->

    

    <a href="***************"><img checked="true" title="Click
    here for bla bla" alt="bla catalogue" src="***************.jpg"
    /></a> &nbsp;&nbsp;

    <a href="****"><img checked="true" title="Click here for
    BlaBla" alt="blabla catalogue" src="**************.jpg"
    /></a> &nbsp;&nbsp;

    <a href="*****"><img checked="true" title="Click here for
    blablup" alt="blablup catalogue" src="*****.jpg" /></a>
    <BR>

    

    To unsubscribe return this email with REMOVE in the
    subject.</a></p>

    

    </body>

    </html>

    

    ***end html pattern*****************

    

    and code something like this 

    (or muuuch more elegantly :-) using a nice report for example)

    

    *****Aubits Code**************

    

    141   #start building the individual html file header

    142   let runcmd = "echo 'From: [email protected]' >
    sendplisttxt.html"

    143   run runcmd

    144   let runcmd = "echo 'To: DUMMYEMAIL' >>
    sendplisttxt.html"

    145   run runcmd

    146   let runcmd = "echo 'Subject: DUMMYSUBJECT' >>
    sendplisttxt.html"

    147   run runcmd

    148   let runcmd = "echo 'User-Agent: Heirloom mailx 12.4 7/29/08'
    >> sendplisttxt.html"

    149   run runcmd

    150   let runcmd = "echo 'Mime-Version: 1.0' >>
    sendplisttxt.html"

    151   run runcmd

    152   let runcmd = "echo 'Content-Type: multipart/mixed;
    boundary=\"klr_boundary

        \"' >> sendplisttxt.html"

    153   run runcmd

    154   let runcmd = "echo >> sendplisttxt.html"

    155   run runcmd

    156   let runcmd = "echo '--klr_boundary' >>
    sendplisttxt.html"

    157   run runcmd

    158   let runcmd = "echo 'Content-Type: text/html;
    charset=iso-8859-1' >> sendplisttxt.html"

    159   run runcmd

    160   let runcmd = "echo 'Content-Transfer-Encoding: 8bit' >>
    sendplisttxt.html"

    161   run runcmd

    162   let runcmd = "echo 'Content-Disposition: inline' >>
    sendplisttxt.html"

    163   run runcmd

    164   let runcmd = "echo >> sendplisttxt.html"

    165   run runcmd

    166

    167   #add the the pdf pricelist converted into base64 in prc.4gl

    169   case

    170    #all status for uk customers, all English

    171    when pr_cust.pstat=1 and pr_cust.plwk = "GBP"

    172      let pdf_string="BWW_GBP_ENG"

    272   end case

    274

    275   #another line feed

    276   let runcmd = "echo >> sendplisttxt.html"

    277   run runcmd

    278

    279   #built the html mail after the boundary for the attachments

    280   let runcmd = "echo '--klr_boundary' >>
    sendplisttxt.html"

    281   run runcmd

    282   let runcmd = "echo 'Content-Type: application/pdf' >>
    sendplisttxt.html"

    283   run runcmd

    284   let runcmd = "echo 'Content-Transfer-Encoding: base64'
    >> sendplisttxt.html"

    285   run runcmd

    286   let runcmd = "echo 'Content-Disposition:
    attachment;filename=\"",pdf_string clipped,".pdf\"' >>
    sendplisttxt.html"

    287   run runcmd

    288

    289   #another line feed

    290   let runcmd = "echo >> sendplisttxt.html"

    291   run runcmd

             #attached the converted pdf

    293   let runcmd = "cat ",pdf_string clipped,".b64 >>
    sendplisttxt.html"

    294   run runcmd

    295

    296   #another line feed

    297   let runcmd = "echo >> sendplisttxt.html"

    298   run runcmd

    299

    300   #boundary end command

    301   let runcmd = "echo '--klr_boundary--' >>
    sendplisttxt.html"

    302   run runcmd

    326

    327   #first the individual greeting

    328   let runcmd=

    329    "sed -i 's/DUMMYTEXT/",pr_cust.adrphrase clipped,"/g'
    sendplisttxt.html"

    330   run runcmd

    331

    332   # change te email address...

    333   let runcmd=

    334     "sed -i 's/DUMMYEMAIL/",pr_cust.email clipped,"/g'
    sendplisttxt.html"

    335   run runcmd

    341

    342   # set the subject of the mail

    343   case

    344     when pr_cust.psprache="ENG"

    345      # change the subject...

    346      let runcmd= "sed -i 's/DUMMYSUBJECT/2012 PDF BlaBla
    Pricelist #",chardummy1 clipped,"/g' sendplisttxt.html"

    347      run runcmd

    360   end case

    361

    362   # and send it all as html with POSTFIX sendmail variety
    (heirloom)

    363   let runcmd= "cat sendplisttxt.html | /usr/sbin/sendmail -t"

    364   run runcmd

    

    Be sure to have all your SPF records and stuff right on your
    mailserver and enjoy, Karl

    

    

    

    Karl L. Rumpf
Málaga
[email protected]
    

    On 02/03/2012 15:10, Simenes . wrote:
    
      
      
        hello all

        

        anyone knows if there is any way to send email directly using
        aubit?

        

        best regards.

      
      

      
      

      ------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
      

      
      

      _______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss

    
  


------------------------------------------------------------------------------

Virtualization & Cloud Management Using Capacity Planning

Cloud computing makes use of virtualization - but cloud computing

also focuses on allowing computing to be delivered as a service.

http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________

Aubit4gl-discuss mailing list

[email protected]

https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss







------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.