Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
amcintosh  
#1 Posted : Wednesday, April 30, 2025 8:24:27 PM(UTC)
amcintosh

Rank: Newbie

Groups: Registered
Joined: 4/30/2025(UTC)
Posts: 1
Australia

Hi all

I'm trying to send an email containing the current workbook as an attachment, however the email being sent out without the file being attached, with no Error message shown either.

In the main sub - I call the function using the parameters below
Code:
eMailTo eto:=eto, ecc:=ecc, subj:=esub, body:=RangetoHTML(rng), attach:=ActiveWorkbook.FullName


and the function used here is -
Code:
Function eMailTo(eto, ecc, subj, body, attach)

Dim e
Set e = CreateObject("EaSEndMailObj.mail")
'Set e = New EASendMailObjLib.Mail

With e
.LicenseCode = (Removed) 
.ServerAddr = (Removed)
.UserName = (Removed)
.Password = (Removed)
.ServerPort = 25
.ConnectType = 4
.FromAddr = (Removed)
.AddRecipientEx eto, 0
.AddRecipientEx ecc, 1
.BodyFormat = 1
.BodyText = body
.Subject = subj
End With

If e.Addattachments(attach) <> 0 Then
MsgBox "Email Attachment Error: " & e.GetLastErrDescription()
End If
    Application.DisplayStatusBar = True
    Application.StatusBar = "Connecting " & e.ServerAddr & " ..."

    e.Asynchronous = 1
   ' InitVariables
'    CurrentEmailIsFinished = False
    e.SendMail

End Function


anybody know where i may have screwed up?
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2025, Yet Another Forum.NET
This page was generated in 0.033 seconds.

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.