Click to See Complete Forum and Search --> : mailing prob


girishp114
September 17th, 2001, 02:37 AM
i tried the following code for my application which aims at checking a test.txt file for a string,on found it should mail it to a particular email addr.It's working but it open internet explorer(hotmail) and again ask for username and password & on entering details compose page opens with the following details filled.Then i h've 2 press send button
With Me
.Mapiss.LogonUI = True
.Mapiss.NewSession = True
.Mapiss.UserName = "abc@yahoo.com"
.Mapiss.Password = "xyz"
.Mapiss.SignOn
Do While .Mapiss.SessionID = 0
DoEvents
Loop
Call Mailit("abc@indiatimes.com", strtext)
.Mapiss.SignOff
End With
/*********************/
Private Sub Mailit(ByVal email As String, ByVal msg As String)
With MAPIMsg
.SessionID = Mapiss.SessionID
.Compose
.RecipAddress = "abcd@indiatimes.com"
.RecipDisplayName = email
.AddressResolveUI = True
.RecipAddress = "smtp:" & email
.MsgSubject = "test email"
.AttachmentPathName = "E:\test.txt"
.MsgNoteText = "my first mail"
.Send false
End With
End Sub

i h've not specified any hotmail addr in this then also it open hotmail dialogbox saying hotmail need u to logon first plz help out.
Thanx for all help being provided in advance
Girish P