Jump to content
Fórum Script Brasil
  • 0

Outlook Express


@line
 Share

Question

5 answers to this question

Recommended Posts

  • 0

Porque voce não envia o e-mail direto do seu sistema:

MAPISession.UserName = origem.Text

MAPISession.Password = senha.Text

MAPISession.SignOn

MAPIMessages1.SessionID = MAPISession.SessionID

MAPIMessages1.Compose

MAPIMessages1.RecipAddress = destino.Text

MAPIMessages1.MsgSubject = assunto.Text

MAPIMessages1.MsgNoteText = mensagem.Text

'anexa no final da mensagem

MAPIMessages1.AttachmentPosition = Len(MAPIMessages1.MsgNoteText)

'define o tipo de dados do anexo

MAPIMessages1.AttachmentType = mapData

'da um nome ao anexo; 'define o caminho e nome do arquivo a anexar

MAPIMessages1.AttachmentName = NomeAnexo

MAPIMessages1.AttachmentPathName = Anexo

'envia o arquivo

MAPISession.SignOff

MAPIMessages1.Send True

Link to comment
Share on other sites

  • 0

Como você falou que poderia chamar o Outlook preenchido, você pode tentar este código.

'********************************************************************

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Const SW_SHOWNORMAL = 1

Private Sub Form_Load()

ShellExecute Me.hwnd, vbNullString, "mailto:[email protected][email protected]&BCC=dd&Subject=Teste de envio de e-mail&body=ola @aline", vbNullString, "C:\", SW_SHOWNORMAL

End Sub

'********************************************************************

Desabiliar as teclas eu acredito que não seja possível.

O unico problema é que não consegui incluir anexo.

Só que agora fiquei curioso...Se alguém souber, posta ai.

Abraço.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      150.7k
    • Total Posts
      648.5k
×
×
  • Create New...