Solved

send lotus notes email with attachment to exchange server

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Connect SQL Server from Lotus Domino Application 7 340
Using @Prompt in a Queryclose Event 14 83
See used databases in Domino 8 100
IBM Lotus Notes Rules not working 5 103
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 article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
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 …

932 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