Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Attachments

Status
Not open for further replies.

arcadi2005

Programmer
Mar 15, 2005
8
US
Hi
This is the first time I am posting on this forum but I am a frequent visitor to this place.I am not sure on how to get this fixed and would definitely like to automate this process.We have Mercator5.0.I need to dynamically change the attachment name of the email I send out to a customer of mine.How do I do this???

Thanks in advance
Arcadi
 
I do something like this
I get my info from an oracle table in another card specific to the filename.... I change the attachment name dynamically. This might be more complex than you need, you might just want -ATT " + GETFILENAME(input),TEXT(input)

hope this helps


PUT("EMAIL","-PR INET -SERVER mail.server.com -SUB '" + SUBJECTLINE Column:Row:eek:utput_MERC_PARTNER_PARAMS + DEST_FILENAME Column:Row:eek:utput_MERC_PARTNER_PARAMS + " " + validated_hostname misc_elements:mercator_environment +
"' -TO "+ EMAILDATA_TO Column:Row:eek:utput_MERC_PARTNER_PARAMS +" -FROM Mercator -ATT " +
DEST_FILENAME Column:Row:eek:utput_MERC_PARTNER_PARAMS, TEXT(input_outbound_data))
 
You could also do this in a RUN statement. If you are still running 5.0, you should start your upgrade real soon. 8.0 will be coming out soon and it will be a bear to make that big of a jump. It won't be easy going to 7.5.1 Also, since 5.0 has been sunsetted, if there are any bugs, you can't get a patch to fix it.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Thanks mjnaaktgeboren.I passed the value and it works.
Boca
I just joined this company 2 days ago and this is one of my priorities.The management has agreed to upgrade every thing to 7.5.I used to work on 6.7 and was upgrading all my maps to 7.5 in my previous one.

The next issue I have is:
Is there any way I can read just the email attachment from outlook folder with a map??The subject line of the email that comes in is always the same.I need the map to read the attachment and process just the attachment and send back an email with the translated file.The guy who used to work here for the past 3 years did this manually every day and I am sure I don't want to do this.Any ideas!!!!!!!!

Thanks in advance
arcadi2005
 
-ATT in the input command line? You will read the whole e-mail, but you can use various parameters and type tree mods (see examples directory) to just pass the attachment to the output card.

Probably 6 different ways to do this.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Figured that out.It is working now.Thanks everyone..........
arcadi2005
 
I used to have a sample email that sent a file attachment. Can't find it but when I use this in the command line of the output card the file content is the email body. I really want to send the file as an attachment..

-proto inet -svr mail.server -sub 'email attachment' -user name -p password -to recipient -att file.ext

Any ideas?
 
What version on what platform?



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
PS:

This send the contents of the file as the email body:

-proto inet -svr mail.server -sub 'email attachment' -user name -p password -to recipient -att file.ext

This sends it as an attachment:

-proto inet -svr mail.server -sub 'email attachment' -user name -p password -to recipient -att file

 
HI
Just wanted to post on how I resolved this issue.We run Mercator 5.0 on WIN2000.The problem was Reading an email attachment with .txt extension, translating the mail and sending an email back with the translated file with a dynamic filename.

Solution:
I tried using the 5.0 Inet adapter and read the attachment using the -ATT command but does not work as the attachment was a .txt file.If I used the -TEXT command it also read the body of the email that I did not want.It also put in a 80 byte wrap around the text msg.If I used the MAPI adapter to read the Inbox I got a Message from outlook saying that another program was accessing the mail box and if this was ok.I had to manually say yes before mercator could read the file.Instead of doing a type tree change for the Inet I downloaded a freeware Clickit that overrides the Outlook msg and used the Mapi adapter.Then made the map read the email.Hope this helps someone else if they are having a similar issue.
 
Eyetry,

Would need to see a test case with two output cards, one with each of the above command strings. Could be a bug if .txt doesn't work. Should be submitted to Ascential support (6.7 version).



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Funny thing happened at work today.....

Told BA that I'd send the file without an extention. The user could then save it as a txt, csv or vary depending on needs.

Added BA to input variable.

Test map has 3 output cards. One with the extention the other without. Ran map without recompiling (command server)...

Both outputs contained the attachment.

Went in dropped the second email and it still works.

Very strange.


 
All I did was put my hands on the Monitor and yelled...



HEAL!



:)




BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top