I am writing a VBA code through which my code will send the active sheet of Zoho sheet as an attachment
on the specified email address of our workplace's email id domain address.
Is there any different code other than you specified if my email server is other than zoho like in this case it is our domain name at zoho workplace.
Public Sub Worksheet_Change()
Application.EnableEvents = false
On Error Goto ENEV
ThisWorkbook.HasRoutingSlip = True
'.from = "email@example.com"
.Recipients = "firstname.lastname@example.org" 'Can send mail to multiple recepients
.Subject = "Trial mail from zoho VBA"
.Message = "Hello! Have a Good Day!! Mail content. " & "Sending trial link here:" & ActiveSheet.Name
.AttachWorkbook = True
'.AttachmentFormat = "pdf"
.SheetName = ActiveSheet.Name ' this will send the active sheet.
Application.EnableEvents = true
With this code we get the email but no attachment with it.
Kindly give me your feedback.