Re: aubit + e-mail
Mike Aubury <[email protected]>
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <CAGAq4WH41oo+eVJGvuBvGQMF_mO2vchKeKPkDN6LWC-37veSew@mail.gmail.com> |
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"<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> > --> > <!-- <a href="***************" target="_blank">Twitter </a><br> --> > > <a href="***************"><img checked="true" title="Click here for bla > bla" alt="bla catalogue" src="***************.jpg" /></a> > <a href="****"><img checked="true" title="Click here for BlaBla" > alt="blabla catalogue" src="**************.jpg" /></a> > <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á[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 [email protected]://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