It looks like you're new here. Sign in or register to get started.
Name DataType Subtype Length Mail Automation 'Microsoft CDO For Exchange 2000 Library'.Message Config Automation 'Microsoft CDO For Exchange 2000 Library'.IConfiguration Fields Automation 'Microsoft ActiveX Data Objects 2.5 Library'.Fields Field Automation 'Microsoft ActiveX Data Objects 2.5 Library'.Field ItemIndex Variant ItemVal Variant SendSMTP(Sender : Text[50];From : Text[50];RcpTo : Text[50];Cc : Text[50];Bcc : Text[50];SMTPServer : Text[50];Subject : Text[150];HTML CLEARALL ; IF ISCLEAR(Mail) THEN CREATE(Mail) ; Config := Mail.Configuration ; Fields := Config.Fields ; ItemIndex := 'http://schemas.microsoft.com/cdo/configuration/SendUsing' ; ItemVal := '2' ; Field := Fields.Item(ItemIndex) ; Field.Value := ItemVal ; ItemIndex := 'http://schemas.microsoft.com/cdo/configuration/smtpserver' ; ItemVal := SMTPServer ; Field := Fields.Item(ItemIndex) ; Field.Value := ItemVal ; ItemIndex := 'http://schemas.microsoft.com/cdo/configuration/smtpserverport' ; ItemVal := '25' ; Field := Fields.Item(ItemIndex) ; Field.Value := ItemVal ; ItemIndex := 'http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout' ; ItemVal := '1' ; Field := Fields.Item(ItemIndex) ; Field.Value := ItemVal ; Fields.Update ; Mail.From := From ; Mail.Sender := Sender ; Mail."To" := RcpTo ; Mail.CC := Cc ; Mail.BCC := Bcc ; Mail.Subject := Subject ; IF NOT ISCLEAR(HTMLBody) THEN Mail.HTMLBody := HTMLBody ELSE Mail.TextBody := TextBody ; Mail.Send ; CLEARALL ;
Comments
Exchange uses MAPI
to just send mails SMTP should be sufficent. What is it you wish to send?
My client has a Exchange at his place. WIll he be able to use NAV for sending emails.
NAV uses default mail client for sending e-mail.
And yes, you can use native SMTP (check download area for Mail.ocx or use 'Microsoft CDO For Exchange 2000 Library'.Message Automation.
http://www.mibuso.com/dlinfo.asp?FileID=366