Solved

send lotus notes email with attachment to exchange server

Posted on 2004-09-01
5
506 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
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying 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

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 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