Re: Use Send message without attachements - WeOnlyDo Discussion board

Re: Use Send message without attachements (General questions)

by nightwalker83, Friday, August 20, 2010, 01:26 (4992 days ago) @ wodDamir

Nightwalker,

Saying doesn't work doesn't really help. Do you receive an error? Which one?

Can you provide me with Transcript property output?

Regards,
Damba

I don't receive an error! However, I fixed the problem by putting the end if straight after the next statement like so:

Public Function SimpleMapiSend()
'8/8/2010
'Check for attachments.
If frmAttachments.LstFiles.ListCount <> 0 Then
For a = 0 To frmAttachments.LstFiles.ListCount - 1
Smtp.Message.attach (frmAttachments.LstFiles.List(a))
Next a
End If
With Smtp
' Add the sender
.Message.From = frmSettings.txtUsername.Text
'Add the recipent
.Message.To = frmCompose.txtTo.Text
'Add the message subject
.Message.Subject = frmCompose.txtSubject.Text
'Add the message body
.Message.Text = frmCompose.txtBody.Text
'Send the message
.SendMessage
End With
End Function

Whereas before I had the End if after the End With .


Complete thread: