Sending Email Via B012505

DanJ

Member
I am trying to program an automatic RMA notification. It is similar to the user going into the tools exit and hitting the "Send Shortcut" button. I am trying to automate it so the users don't have to type the receipiant or message. I have the email sending but I can't figure out how to attach a message with the media object. The B012505 function has 2 parameters (szNameObject and GenericTextKey) that attach a text file from media object GT01131. Does anyone now how I can programmatically attach a text message to this email. I have the code below that does send the message with a working link. I can't figure out the email body however...

evt_URLString
evt_EmailSubject

VA evt_URLString = "IsMenu=0..Application=P5400511..Form=W5400511B.
.Version=NFT0001..DataFormat=1|W5400511B|1|2|3|4|5|6|7|8|9|10|11|12|13"

VA evt_EmailSubject = concat("Changes needed for RMA ", [FC RMA Number])

VA evt_URLString = concat([VA evt_URLString],"|14|15|16|17|18|19|20|21|22|23|24
..Data=")

VA evt_URLString = concat([VA evt_URLString],[FC RMA Number])

VA evt_URLString = concat([VA evt_URLString],"|R8|00001|1.000|0|0|0| | | | | |
| |0|0|0|0|0| | NFT10|0| | ..PODataFormat=1|T400511|3|4|5")

Send Shortcut from the Tools menu is OW Applications
"35123" -> BF mnAddressNumber
<Blank> -> BF szOrganizationTypeStructur
VA evt_EmailSubject -> BF szPPATBriefMassage
VA evt_URLString -> BF szShortcutString
"01" -> BF szMailBoxDesignator
<Blank> -> BF cUseStructureType
 
Dan,

Why don't you use the "Send E-Mail - HRM" B0500190 function instead ?

You can specify the From, To, CC as well as specify the attachment file to use.

Check the P05003 application to understand its usage.

It's also one of the few JDE functions blessed with an attachment explaining the parameters. What more does one need ?
grin.gif


Regards,

Shailesh
 
The biggest advantage I saw to b012505 was that it allowed me to create the shortcut attachment as a text string. It looks like with b0500190 I need to create a shortcut file on the disk then attach it too the email. B01205 looked like a quicker solution but I cant seem to figure out how to attach the actual eMail.
 
The B0500190 not exist in E812 standart installation. The best way to send e-mail from the code is the API JDEMSendEMail: you can create a e-mail with all the attachment you need specifying the file name:

JDE_SendEMailSMTPExt(
lpDS->szFromEMail, /* From */
pBody, /* Body */
lpDS->szSubject, /* Subject */
TEXT_PLAIN, /* Content Type */
pSmtpAttachments, /* Attachments */
numSmtpAtt, /* Number of attachments */
lpDS->szTOEMail, /* To */
lpDS->szCCList, /* Cc */
NULL) ; /* Bcc */

You can see the use of the function in b0200900 or in b0500725, in this case with files not binary for the attachments.

Hope this helps.
 
Shailesh,

wanna start looking to see how many places B0500190 'was' being used in your
8.12 implementation? The function doesn't come up in OMW...

Concerned - "HEY YES I M" - why does jde/bOrgaCle do things like that to
us? Give us a perfectly good function to build applications on - then yank
it from our feet?

(db)

--
 
FYI In EPR9 (not sure what toolset we're on today) there is a replacement for Send HRM EMail (B0500190), it is now Send HRM EMail (B0501320). This would appear to be pretty much the same, but without CC and BCC in the DS, although the API (JDE_SendEMailSMTPExt) that it calls accepts them. I believe this API is a replacement for JDE_SendEMailSMTP, the only difference between the two is that the former has the additional parameter MIME type, otherwise they are identical. See System\includ\mime_type.h for acceptable MIME types.
 
Back
Top