Focal Point
[CLOSED] Maintain - send a silent email with bcc

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/439108042

September 16, 2009, 06:10 AM
Dr. Nick
[CLOSED] Maintain - send a silent email with bcc
Hi,
Does anyone have javascript code to send a silent email with a list of BCCs from Maintain.
Thank you,
Nick

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.7.03 & 8.0.7
Windows
HTML, Excel, PDF, etc.
Also, using Maintain, etc.
September 16, 2009, 07:02 AM
Anmol
Dr. Nick,
can u just elaborate more about what u actually want to do about silent mails in javascript.

regards,
anmol


WebFocus7.6.2, WebFocus 7.1.1,Windows
HTML, PDF and Excel
September 16, 2009, 07:56 AM
Dr. Nick
Hi Anmol,
Currently, a Maintain sends many emails to a list of receipients. Although, this has some degree of success, a better method would be to send one email with the list of receipients in the BCC list.
Do you have javascript to send emails with support for BCC? IBI's method does not support BCC.
Thank you in advance,
Nick


WebFOCUS 7.7.03 & 8.0.7
Windows
HTML, Excel, PDF, etc.
Also, using Maintain, etc.
September 16, 2009, 11:32 AM
Maintain Wizard
We have a jsp technique that can be performed from a Maintain procedure that takes From, To, Subject and Body. It uses smtpClient to kick off a silent e-mail using the parms collected from the Maintain procedure.

There does not seem to be any way to add CC, BCC or attachments. Nick (and I) are wondering if anyone has a way to do this as well.

Thanks
Mark
September 16, 2009, 12:54 PM
Dave Ayers
How about EXEC'ing a Focexec from the maintain to sent email through Reportcaster ?


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
September 16, 2009, 01:51 PM
Dr. Nick
Hi Dave,
Good idea but I am not using Report Caster, at this time.
Nick


WebFOCUS 7.7.03 & 8.0.7
Windows
HTML, Excel, PDF, etc.
Also, using Maintain, etc.
September 17, 2009, 04:29 AM
Alan B
The last time I did this, which was a few years ago now, I used an AJAX call to an ASP page and CDONTS. Requires IIS.

The ASP method is server, not client / browser based, so can be run from any browser / machine.

The data for the e-mail was sent with the AJAX call and picked up in the Request.QueryString. Full cc and bcc are available. I think I had problems with attachments though!


Alan.
WF 7.705/8.007
September 17, 2009, 08:31 PM
Dr. Nick
Hi Alan,
Thanks for the info. I am running IIS on the server, so this should be a viable solution. Can you provide code so I can use and give to Mark for other users?
Thank you,
Nick


WebFOCUS 7.7.03 & 8.0.7
Windows
HTML, Excel, PDF, etc.
Also, using Maintain, etc.
September 18, 2009, 04:37 AM
Alan B
Nick

Unfortunately, or not, MS have stopped CDONTS now and use CDOSYS. This should be the same(ish).

The code I have is tied in to the old, and is really difficult to separate out, and I don't have any time at the moment.

Basically create an ASP page, using examples you can Google, to use CDOSYS to send an email. That is pretty straight forward, and should work on its own with parameters supplied in the URL.

Add a javascript to your page for an AJAX call. There are examples on the forum here. Remove any ajax response code, you won't need that.

Add the parameters you want to send on the email from your page, and add to the URL you will use to call the asp with the AJAX GET call.


Alan.
WF 7.705/8.007
September 21, 2009, 03:46 PM
Dr. Nick
Hi Alan,
I am not very familar with AJAX and the integration of the parts you presented. Is it possible to use only javascript to send to a list of BCCs?
Nick


WebFOCUS 7.7.03 & 8.0.7
Windows
HTML, Excel, PDF, etc.
Also, using Maintain, etc.
September 22, 2009, 04:41 AM
Alan B
Nick

For a javascript only solution, not that I am aware of.


Alan.
WF 7.705/8.007
September 22, 2009, 05:04 AM
Tony A
Nick,

Like Alan, I use CDONTS via ASP but not via Maintain (although the principle is identical). It's a piece of cake and there are lots of examples on the interweb.

To my knowledge, there is no JavaScript alternative without AJAX, although you might have success within your HTML page using VBScript instead - I've not tried it as there are certain settings that you wouldn't want visible in your code!

One thing I would also make a note of is that many sites will actively block certain ports such as port 25 which will then preclude sending SMTP. I have also have problems in the past with McAfee blocking some things, so make sure you check.

If you have Report Caster installed then you should be able to run the ASP on that server as it's likely to be the web server as well(?) and will also have the ports set to your needs etc.

I also use CDONTS using VBScript, mainly to allow post processing of Excel templates to format and resave as proper .xls files before sending them out to the end users as attachments. It reduces the size and it's something you can't do within Report Caster.

A previous posting is here.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10