Sending an e-mail from a BPM

Hi,

Someone previoulsy posted 4gl code to send an email from BPM on the site. Unfortunately, I don't have it to hand.




________________________________
From: bobschnable <bschnable@...>
To: vantage@yahoogroups.com
Sent: Wed, 16 December, 2009 21:57:36
Subject: [Vantage] Re: Sending an e-mail from a BPM

Â
Well that was part of the reason for my post. I'm familiar with the built in e-mail send option. However, I need to included the ctemp variable I declare in my code, and I was unsure if I was able to carry that over to the prebuilt e-mail action. I assume not, and that I needed to code the email sending myself.

--- In vantage@yahoogroups .com, "foamdesigncsw" <foamdesigncsw@ ...> wrote:
>
> BPM has it's own Email action that you can use will this not accomplish what you want?
>
> If you add an action one of the options is Send email based on email template.
>
> --- In vantage@yahoogroups .com, "bobschnable" <bschnable@> wrote:
> >
> > Hello all,
> >
> > I am running a BPM to let me know when there is a change in selling quantity on orders. This is my current code:
> >
> >
> > For each orderdtl, each ttorderdtl where ttorderdtl.Company = orderdtl.Company
> > and ttorderdtl.ordernum = orderdtl.ordernum and orderdtl.SellingQua ntity <> ttorderdtl.SellingQ uantity no-lock.
> >
> > Define variable cTemp as Character no-undo.
> >
> > Assign cTemp = 'Before: ' + String(orderdtl. sellingquantity) + ' After: ' +
> > String(ttorderdtl. sellingquantity) .
> > {lib\PublishInfoMsg .i &InfoMsg = "cTemp"}.
> >
> > As you can see, I diplay a message box with the before and after values. What I can't seem to figure out is how to send an e-mail from the same pre-processing directive, or by adding another action. I've tried taking some of the code from sending an e-mail in BAM's, but can't seem to get it right.
> >
> > Thanks in advance!
> >
>







[Non-text portions of this message have been removed]
Hello all,

I am running a BPM to let me know when there is a change in selling quantity on orders. This is my current code:


For each orderdtl, each ttorderdtl where ttorderdtl.Company = orderdtl.Company
and ttorderdtl.ordernum = orderdtl.ordernum and orderdtl.SellingQuantity <> ttorderdtl.SellingQuantity no-lock.

Define variable cTemp as Character no-undo.

Assign cTemp = 'Before: ' + String(orderdtl.sellingquantity) + ' After: ' +
String(ttorderdtl.sellingquantity).
{lib\PublishInfoMsg.i &InfoMsg = "cTemp"}.

As you can see, I diplay a message box with the before and after values. What I can't seem to figure out is how to send an e-mail from the same pre-processing directive, or by adding another action. I've tried taking some of the code from sending an e-mail in BAM's, but can't seem to get it right.

Thanks in advance!
BPM has it's own Email action that you can use will this not accomplish what you want?

If you add an action one of the options is Send email based on email template.

--- In vantage@yahoogroups.com, "bobschnable" <bschnable@...> wrote:
>
> Hello all,
>
> I am running a BPM to let me know when there is a change in selling quantity on orders. This is my current code:
>
>
> For each orderdtl, each ttorderdtl where ttorderdtl.Company = orderdtl.Company
> and ttorderdtl.ordernum = orderdtl.ordernum and orderdtl.SellingQuantity <> ttorderdtl.SellingQuantity no-lock.
>
> Define variable cTemp as Character no-undo.
>
> Assign cTemp = 'Before: ' + String(orderdtl.sellingquantity) + ' After: ' +
> String(ttorderdtl.sellingquantity).
> {lib\PublishInfoMsg.i &InfoMsg = "cTemp"}.
>
> As you can see, I diplay a message box with the before and after values. What I can't seem to figure out is how to send an e-mail from the same pre-processing directive, or by adding another action. I've tried taking some of the code from sending an e-mail in BAM's, but can't seem to get it right.
>
> Thanks in advance!
>
Well that was part of the reason for my post. I'm familiar with the built in e-mail send option. However, I need to included the ctemp variable I declare in my code, and I was unsure if I was able to carry that over to the prebuilt e-mail action. I assume not, and that I needed to code the email sending myself.



--- In vantage@yahoogroups.com, "foamdesigncsw" <foamdesigncsw@...> wrote:
>
> BPM has it's own Email action that you can use will this not accomplish what you want?
>
> If you add an action one of the options is Send email based on email template.
>
> --- In vantage@yahoogroups.com, "bobschnable" <bschnable@> wrote:
> >
> > Hello all,
> >
> > I am running a BPM to let me know when there is a change in selling quantity on orders. This is my current code:
> >
> >
> > For each orderdtl, each ttorderdtl where ttorderdtl.Company = orderdtl.Company
> > and ttorderdtl.ordernum = orderdtl.ordernum and orderdtl.SellingQuantity <> ttorderdtl.SellingQuantity no-lock.
> >
> > Define variable cTemp as Character no-undo.
> >
> > Assign cTemp = 'Before: ' + String(orderdtl.sellingquantity) + ' After: ' +
> > String(ttorderdtl.sellingquantity).
> > {lib\PublishInfoMsg.i &InfoMsg = "cTemp"}.
> >
> > As you can see, I diplay a message box with the before and after values. What I can't seem to figure out is how to send an e-mail from the same pre-processing directive, or by adding another action. I've tried taking some of the code from sending an e-mail in BAM's, but can't seem to get it right.
> >
> > Thanks in advance!
> >
>