Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

send lotus notes email with attachment to exchange server

Posted on 2004-09-01
5
Medium Priority
?
512 Views
Last Modified: 2013-12-18
I have a program in visual basic which will send email with attachment. The program can send email to external (internet) email or Internal Lotus Notes email with an attachment. however, I cannot send internal email to an exchange server with attachment. (there is a DEIVERY FAILURE email coming back to my email account and it said that the Message had "syntax that was not valid".

but I can send internal email to an exchange server without attachment. I think maybe the program of the syntex of the attached email highlighted below... Please help!!


    Dim OLESess As Object
    Dim OLEDB As Object
    Set OLESess = CreateObject("Notes.Notessession")
    Set OLEDB = OLESess.GetDatabase("", "")    

    On Error GoTo NotesError
    Const EMBED_ATTACHMENT = 1454
    ' Creates a new document/message.
    Dim Doc As Object
    Dim NItem As Object
    Set Doc = OLEDB.CreateDocument
       
    With Doc
        ' creates body of message and populates headers
        Set NItem = Doc.CREATERICHTEXTITEM("BODY")
        .Form = "Memo"
        .Subject = MySubject
        .SendTo = MySendTo
        .CopyTo = MyCopyTo  'MyCopyTo is an array of receiver
        .Body = MyBody
        .postdate = Date
        .SaveMessageOnSend = True
        .PostedDate = Now
               
        Call NItem.EMBEDOBJECT(1454, "", MyAttach, "Attachment")    <<<<------------------
        Doc.CREATERICHTEXTITEM ("Attachment")
       
        .Send False
    End With


Thanks
0
Comment
Question by:leekf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 2

Author Comment

by:leekf
ID: 11951070
hold on please, i think i have found the answer
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 11951327
I can't hold on.

I am giving the solution right away. I can't let got a 500 points question like that.

the solution is:
If you found the answer by now, then delete this question posting a request in community support.

or if you are generous in points, then accept this as answer.

But for your problem, I don't have solution. Thinking it is happening because of names format. Not sure.
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 11952976
This is just a guess: try to add the attachment as an attachment (not embedded object) to the body rich text item of your mail and then send it.
Notes/Domino will automatically convert it to a regular attachment for internet mail.
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 2000 total points
ID: 11954287
Hi jerrith,

The EmbedObject method is used for both attachments and OLE objects.  It is the correct way (only way) to attach files using the NotesDocument/NotesRichTextItem classes.

More likely, the address syntax was incorrect.  What was the value of mySendTo?  If you are using the Exchange connector with Directory Sync, then it should be just the person's name.  If using the connector w/o sync, then it is usually something like "user name@MSEXCHANGE"

If you are not using the Exchange connector at all, then you probably need to use internet addressing, as if it was an external user.

Cheers!
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 11961053
Yep, I know. It's the type that specifies if it's an attachment or ole object.
I see he put in the number in stead of the constant alias, didn't check if it was the correct number :-)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question