Solved

send lotus notes email with attachment to exchange server

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now