-
Apr 15th, 2014, 06:59 AM
#1
Thread Starter
PowerPoster
Create email with link to file
I have a web service that takes an XML string for input and saves the XML to a file. The filename is created from the date and time and a random number generator. The program also edits the XML as it processes, and there can be errors. When there's an error, I create an email which describes the error and then repeats the XML in the body of the email. I am using another web service written in-house to send the email.
I want to include in the email a link to the filename I saved. What is the best way to do this? I think I need to use HTML, but there's an html flag I pass to the email web service which needs to be false. When it was true, the XML wasn't formatting.
There are 10 kinds of people in this world. Those who understand binary, and those who don't.
-
Apr 15th, 2014, 08:03 AM
#2
Addicted Member
Re: Create email with link to file
If you're setting the email format to text ( HTML = false ) then you won't be able to have an html link in the body. Can you set it to true and reference a style sheet for your xml to format it within the html body?
If you must leave the body as text how about attaching the file to the email?
_____________
Tim
If anyone's answer has helped you, please show your appreciation by rating that answer.
When you get a solution to your issue remember to mark the thread Resolved.
reference links
-
Apr 15th, 2014, 08:11 AM
#3
Thread Starter
PowerPoster
Re: Create email with link to file
Thanks for the reply!
Originally Posted by thetimmer
...Can you set it to true and reference a style sheet for your xml to format it within the html body?
I have no idea... But thanks for the suggestion. I've already emailed my boss that they looked mutually exclusive so he may not want to go to great lengths. I will wait to see what he says.
There are 10 kinds of people in this world. Those who understand binary, and those who don't.
-
Apr 30th, 2014, 08:14 PM
#4
Member
Re: Create email with link to file
Not certain this will work, but it might be worth a try:
You may be able to preserve the XML formatting by enclosing the XML text (with HTML=true) with the <pre> tag -- preformatted text. This will preserve the spaces in the xml, rather than removing them the way that HTML typically does. Then you can use the HTML e-mail and the link will work, and the XML will look right.
http://www.w3schools.com/tags/tag_pre.asp
Hope that helps!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|