|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: |
##FOR REFERENCE THIS IS (IN PART) THE CODE ORIGINALLY PROVIDED BY BILL HANSON##
Sub ValidationComplete(sendto As String, ByVal subject As String, ByVal html As String, imageFiles() As String, imageTypes() As String, imageIds() As String, ByVal fromFile As Boolean)
Dim sess As Object, db As Object, doc As Object, stream As Object
Dim mimeBody As Object, mimeHtml As Object, mimeFile As Object, mimeImage As Object, mimeHeader As Object
Dim mailServer As String, mailFile As String
Dim i As Integer
Dim convertMime As Boolean
Const ENC_NONE = 1725
Const ENC_QUOTED_PRINTABLE = 1726
Const ENC_IDENTITY_8BIT = 1729
Const ENC_IDENTITY_BINARY = 1730
' Create an email doc
Set sess = CreateObject("Lotus.NotesSession")
sess.Initialize ("nag1999")
mailServer = sess.GetEnvironmentString("MailServer", True)
mailFile = sess.GetEnvironmentString("MailFile", True)
Set db = sess.GetDatabase(mailServer, mailFile, False)
Set doc = db.CreateDocument()
doc.SaveMessageOnSend = False
Call doc.ReplaceItemValue("Form", "Memo")
Call doc.ReplaceItemValue("Subject", subject)
'This isn't working for some reason
'Call doc.ReplaceItemValue("Principal","John Smith")
' add the body as a mime html part
convertMime = sess.convertMime
sess.convertMime = False
Set stream = sess.CreateStream()
'If (fromFile) Then html = FileRead(html)
html = html
stream.WriteText (html & "<br><br>")
Set mimeBody = doc.CreateMIMEEntity("Body")
Set mimeHtml = mimeBody.CreateChildEntity(Nothing)
Call mimeHtml.SetContentFromText(stream, "text/html; charset=""iso-8859-1""", ENC_QUOTED_PRINTABLE)
Call stream.Close
' add images referenced by cid tags
For i = 0 To UBound(imageFiles)
Set mimeImage = mimeBody.CreateChildEntity(Nothing)
Set mimeHeader = mimeImage.CreateHeader("Content-ID")
Call mimeHeader.SetHeaderVal("<" & imageIds(i) & ">")
Call stream.Open(imageFiles(i))
Call mimeImage.SetContentFromBytes(stream, imageTypes(i) & "; name=" + imageIds(i), ENC_IDENTITY_BINARY)
Call stream.Close
Next
' send the document
Call doc.Send(False, sendto)
'Added some clean up as some issues with locking notes up were encountered
Set sess = Nothing
Set db = Nothing
Set doc = Nothing
Set stream = Nothing
Set mimeBody = Nothing
Set mimeHtml = Nothing
Set mimeFile = Nothing
Set mimeImage = Nothing
Set mimeHeader = Nothing
End Sub
|
Advertisement
| Hall of Fame |