I am not sure of the proper structure to change this over to smtp email. The Outlook code works, but we use a remote server to access Visual when not in the office, and I am not allowed to put Outlook on the remote server. Does anyone know how to do this?
Set objOutlook = CreateObject("Outlook.Application")
Set objMail = objOutlook.CreateItem(0)
objMail.Display 'To display message
objMail.Recipients.Add (Emailadd2)
objMail.Subject = EmailSubj
objMail.Body = EmailBody
'objMail.Attachments.Add \\application\Visual\VMX\Purch_ORDER_MACRO.vmx 'Make sure attachment exists at given path. Then uncomment this line. objMail.Send 'I intentionally commented this line
'objOutlook.Quit
Set objMail = Nothing
Set objOutlook = Nothing
Would like to change it to SMTP mail server:
smtprelay.corp.com
port: 25no ssl
no username
no password
from xxxxx@xxxxxxxxxxxx .com