Hi I am in charge of a software application that needs to send and receive emails containing data.
The program gives two alternatives for mail smtp (via easymail objects) and MAPI.
The problem that I have is that for the easymail objects to work relaying needs to be turned on for authenicated users. Some of my customers are not willing to do this. For this reason with have a MAPI option. The problem that I have is that with MAPI I cannot send mail from anyone but the defualt profile. I have looked onto threads here and none of them appears to have an answer that just appear to fizzle out.
What I need is either a means of sending mail via mapi which is not the default profile or an alternate means that does not need relaying turned on. My mapi code is as follows.
Sub sendMail(User As String)
.NewSession = True
.UserName = User 'this is the outlook profile
'.Password = passwrord
.DownLoadMail = False
.LogonUI = True
MAPIMessages1.SessionID = .SessionID
.RecipType = mapToList
.RecipAddress = "firstname.lastname@example.org"
.MsgNoteText = User & " " & CStr(Now())
.MsgSubject = "Electronic Filing " & User
'MainMessage "Disconnecting from Mail Server"
I am testing this on a windows 2000 machine, using mail accounts that are remote hosted via fasthosts. I have set outlook as my default mail client. I also have outlook express and Lotus Notes installed.
Any help would be greatly appreciated.