[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.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

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!

6.2

Connecting to a different mailin DB in lotus notes

Asked by Dezzar82 in Lotus Notes, Hypertext Markup Language (HTML)

Tags: lotus notes html email maildb mime

Hi All,

I am using some code originally posted by Bill Hanson for sending HTML emails through lotus notes.  Posted here:  http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/Lotus_SmartSuite/Lotus_Notes/Q_24468076.html?sfQueryTermInfo=1+attach+displai+imag+lotu

..and thank you very much Bill it has provided some functionality long missing from my systems.

Previously I had been using some avilable code that I'd fine tuned for just plain text emails....

Two questions then:
a) I find with this code that I am unable to set the "Principal" with the email.  Generally I had been able to say set say (MailDoc.Principal = "Frederick Von Harpen") in the mail code and so when the mail was sent, it would appear to come from good ol frederick.  Setting [Call doc.ReplaceItemValue ("Principal","Frederick Von Harpen")]is ineffectual on this code and I'm not really sure why....it should work the same as does CopyTo, BlindCopyTo, RepyTo etc...all of which work, except "Principal"

b) I would like to be able to send the mail through a specified mail database.  The code just grabs your default mail DB for sending the mail, but here in the office we have lotus notes open with our own mail, and common shared mailboxes.  How would I modify the code to select a specific mailbox?

I am not overly proficient in VB so please be kind in your responces as I am likely to simply copy paste and test :)

Cheers
DeZZar
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
[+][-]10/08/09 01:58 AM, ID: 25523263Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/08/09 03:51 AM, ID: 25523853Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/08/09 04:12 AM, ID: 25524003Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/08/09 05:00 AM, ID: 25524337Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/08/09 07:47 AM, ID: 25526036Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/08/09 03:03 PM, ID: 25530672Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/08/09 03:41 PM, ID: 25530980Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/08/09 04:20 PM, ID: 25531231Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]10/08/09 04:30 PM, ID: 25531293Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/08/09 04:38 PM, ID: 25531343Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/08/09 05:22 PM, ID: 25531544Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Lotus Notes, Hypertext Markup Language (HTML)
Tags: lotus notes html email maildb mime
Sign Up Now!
Solution Provided By: Dezzar82
Participating Experts: 1
Solution Grade: A
 
[+][-]10/09/09 02:44 AM, ID: 25533417Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]10/09/09 02:50 AM, ID: 25533439Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/09/09 05:09 AM, ID: 25534114Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/09/09 05:34 AM, ID: 25534295Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/14/09 03:05 PM, ID: 25575697Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/15/09 02:07 AM, ID: 25578640Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/03/09 02:14 PM, ID: 25734407Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625