Solved

send lotus notes email with attachment to exchange server

Posted on 2004-09-01
5
507 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 500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Text over two lines in VBA for email 26 172
Domino Smart Upgrade from Release 8.5.3 to 9.0.1 1 1,042
Lotus Notes 6.5.5 6 233
Problem setting value in rich text field with action 11 64
For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

734 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