Web form outlook email

C

Chuck Farah

i heard from our it folks that you cannot use the
outlook.application named space to email. i.e. the
following will never work, get security errors or nothing
at all happens.


Sub SendAttach()
'Open mail, adress, attach report
Dim objOutlk 'Outlook
Dim objMail 'Email item
Dim strMsg
Const olMailItem = 0
'Create a new message
objOutlk = CreateObject("Outlook.Application")
objMail = objOutlk.createitem(olMailItem)
objMail.To = "(e-mail address removed)"
objMail.cc = "" 'Enter an address here To include
a carbon copy; bcc is For blind carbon copy's
'Set up Subject Line
objMail.subject = "I saw your code On Planet
Source Code on " & CStr(month(now)) & "/" & CStr(day
(now)) & "/" & CStr(year(now))
'Add the body

strMsg = "Your code rocks!" & vbcrlf
strMsg = strMsg & "I voted and gave you an
excellent rating!"
'To add an attachment, use:
'objMail.attachments.add
("C:\MyAttachmentFile.txt")
objMail.body = strMsg
objMail.display() 'Use this To display before
sending, otherwise call objMail.Send to send without
reviewing
'Clean up
objMail = Nothing
objOutlk = Nothing
End Sub


If its possible i may need help just to get this silly
thing to work, ie do i have to do some security
changes,register things on my server etc..etc..,

run this on my pc (local iis) which is XP and of course
has the outlook client

(BTW using windows forms this works fine!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top