| |

VerySource

 Forgot password?
 Register
Search
View: 691|Reply: 1

vb e-mail questions, ask for help!

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-13 20:30:01
| Show all posts |Read mode
Sending mail using MAPI, I do n’t know why it always exists in Outlook ’s outbox after sending it. I have to open Outlook to send it out. How can I send it directly without opening Outlook? Help out!
The procedure is as follows:
Private Sub email_Click ()
MAPISession1.SignOn
With MAPIMessages1
  .MsgIndex = -1
  .RecipDisplayName = email_address.Text
  .MsgSubject = txtSubject.Text
  .SessionID = MAPISession1.SessionID
  .AttachmentPathName = path name
  .Send
  End With
  MAPISession1.SignOff
  MsgBox "Mail sent!",, "Send mail"
End Sub
Reply

Use magic Report

0

Threads

14

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-6-21 01:30:02
| Show all posts
MAPISession1.DownLoadMail = False'Do not immediately enter the user's mailbox
MAPISession1.LogonUI = false
MAPISession1.SignOn'Activate
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
MAPIMessages1.RecipAddress = strMailAdd'recipient address
MAPIMessages1.ResolveName
MAPIMessages1.RecipDisplayName = strAddName'Recipient's name
MAPIMessages1.MsgSubject = strSubject'Subject sent
MAPIMessages1.MsgNoteText = strNoteText'sent contents
MAPIMessages1.AttachmentIndex = 0'Index position of the current attachment
MAPIMessages1.AttachmentPathName = "d:\1.mdb"'The path of the attachment
MAPIMessages1.Send'Start sending
MAPISession1.SignOff'Close
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list