issue while sending detail by mail (1 Viewer)

premdasp

premdasp
Local time
Today, 14:50
Joined
Jul 7, 2008
Messages
5
Dear Sir,

now on days i can't send mail thru this procedure (attached). could you tell what is the problem please.
 

Attachments

  • issue email.jpg
    issue email.jpg
    33.4 KB · Views: 75
Last edited:

CJ_London

Super Moderator
Staff member
Local time
Today, 10:50
Joined
Feb 19, 2013
Messages
16,553
your attachment has a problem. Copy your code then click on the </> button and paste into the window that opens
 

premdasp

premdasp
Local time
Today, 14:50
Joined
Jul 7, 2008
Messages
5
your attachment has a problem. Copy your code then click on the </> button and paste into the window that opens
Dear Sir,

issue attached
 

CJ_London

Super Moderator
Staff member
Local time
Today, 10:50
Joined
Feb 19, 2013
Messages
16,553
are you getting an error? if so what is the error message?

And always better to copy/paste the code as described. It can be difficult to respond to attachments
 

premdasp

premdasp
Local time
Today, 14:50
Joined
Jul 7, 2008
Messages
5
are you getting an error? if so what is the error message?

And always better to copy/paste the code as described. It can be difficult to respond to attachments

'Email the results of the report generated
Set oEmail = oApp.CreateItem(olMailItem)
With oEmail
.Recipients.Add Me.ET_FSmail
.CC = [Form_PM_Schedule].ET_FMmail & "; AjeeshCJ@et.ae; PrakashBR@et.ae; m.Afsal@et.ae; NimalST@et.ae; RajeshNS@et.ae; NaseebNA@et.ae; SivadasSN@et.ae"

If IsNull(Me.REG_EX) Then
.Subject = Me.Fleet & " - " & Me.Manufacturer & " - " & Me.Model & " - " & " Service (PM) Scheduled on " & Me.PM_BookDate
Else
.Subject = Me.Fleet & " - " & Me.Manufacturer & " - " & Me.Model & " - " & " Service (PM) Scheduled on " & Me.PM_BookDate & " ** " & Me.REG_EX & " **"
End If

If Me.WC = "3004" Then


.Body = "Dear Rizwan" & "," & Chr(10) & _
WishTime & Chr(10) & "Kindly find above said details and do needful arrangement" & Chr(10) & Me.USER_DETLS & Chr(10) & Chr(10) & "Best Regards" & Chr(10) & "Premadas Puthiyiruthy"

Else

.Body = "Dear " & " ," & Chr(10) & "Kindly find above said details please" & Chr(10) & Chr(10) & "Best Regards" & Chr(10) & "Premadas Puthiyiruthy"

End If
' strbody = "Hi there " & vbNewLine & vbNewLine & _
' "This is line 1" & vbNewLine & _
' "This is line 2" & vbNewLine & _

' .Attachments.Add fileName

.Display

'.Send
End With
Me.ET_MailDate = Now()
MsgBox "Email successfully created !", vbInformation, "EMAIL STATUS"

Else
MsgBox "NO NEED TO SENT MAIL"
End If
End Sub
 

Attachments

  • Error.jpg
    Error.jpg
    11.2 KB · Views: 71

CJ_London

Super Moderator
Staff member
Local time
Today, 10:50
Joined
Feb 19, 2013
Messages
16,553
looks like you have not added the outlook library to your references

in the VBA window, got to Tools>References and scroll down until you find once called Mircorsoft Outlook xx.x Object Library and select it
 

Users who are viewing this thread

Top Bottom