Borje Posted November 27, 2010 Share Posted November 27, 2010 Hello is here anybody know syntax to read html code and then send this, i have test to read a file $objMessage.CreateMHTMLBody("file://C:/test.htm") and that works but I would like to integrate it in the script and not needed the file. Anybody ? Link to comment Share on other sites More sharing options...
Zedna Posted November 27, 2010 Share Posted November 27, 2010 (edited) $objMessage.HTMLBody = "<h1>This is some sample message html.</h1>" Edited November 27, 2010 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Borje Posted November 28, 2010 Author Share Posted November 28, 2010 (edited) Thanks Zedna I have try you example and that works i have test the same before but what i try is this little file a have in html format I can not have this to work inside the script and not need the separate file test.html.. Html Code: <html> <head> <title>Test Text here</title> </head> <table cellpadding=5 cellspacing=5 border=2 bordercolor=#666666 bgcolor="#C0C0C0"> <tr> <td align=center colspan="2" bgcolor="#33CCCC"> <b> <font size="5">Test Message</font><br> <font color=#000080</font> </b> </td> </tr> <tr> <td align=center bgcolor="#E41B17"> <b><font size="5" color="#FFFFFF">Some text</font></b> </td> <td align=center bgcolor="#E41B17"> <font color="#FFFFFF">Sunday</font> </td> </tr> <tr> <td align=right bgcolor="#33CCCC"color="#FFFFFF">Some other text</td> <td align=left bgcolor="#33CCCC"> <font color="#000000">Other text</font> </tr> <tr> <td align=right bgcolor="#33CCCC">Some other text</td> <td align=left bgcolor="#33CCCC"> <font color="#000000">Other text</font> </tr> <tr> </table> </body> </html> Edited November 28, 2010 by Borje Link to comment Share on other sites More sharing options...
Borje Posted November 28, 2010 Author Share Posted November 28, 2010 (edited) I have solved the first problem to send this html example and have that to works now, the solution was to take all html code and insert this $objMessage.HTMLBody = "all html code here" and it works with minimum changes.. But one another question is: If i have a string value and would like to put in the value from a example $Date in the html code there the text (Other text) appear. $Date = "2010-11-28" and have this in other text" <font color="#000000">Other text</font> Anybody have some tips? Edited November 28, 2010 by Borje Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now