Photo Gallery
Member List
Search
Calendars
FAQ
Ticket List
Log Out
Forums
Register
Login
My Profile
Inbox
Address Book
My Subscription
My Forums
send email
Logged in as: Guest
arrSession:exec spGetSession 2,16,26912
Active Users: There are
0
members and
0
guests.
Users viewing this topic: none
Printable Version
All Forums
>>
[Scripting]
>>
Post a VBScript
>> send email
Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page:
[1]
Login
Message
<< Older Topic
Newer Topic >>
send email -
10/13/2005 8:25:02 AM
kirrilian
Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status:
offline
Edited, see the comments.
sendEmail "me@toyou.com", "user@somecorp.com", "hi", "testing", "c:\temp\XF86Config" Sub sendEmail(sentfrom, sendto, subject, textBody, attachment) Set objMessage = CreateObject("CDO.Message") objMessage.Subject = subject objMessage.Sender = sentfrom objMessage.To = sendTo objMessage.Cc = SendToCC objMessage.TextBody = TextBody objMessage.AddAttachment Attachment 'attach the output file 'objMessage.AddAttachment outputAttachment1 'attach the no acct file '==This section provides the configuration information for the remote SMTP server. '==Normally you will only change the server name or IP. objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'make sure you change this to your own smtp server 'Name Or IP of Remote SMTP Server objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.somewhere.com" 'Server port (typically 25) objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objMessage.Configuration.Fields.Update '==End remote SMTP server configuration section== objMessage.Send WScript.Echo "Email Sent" End sub 'sendEmail
< Message edited by
kirrilian
--
1/8/2006 2:49:13 PM
>
_____________________________
Have you searched
here
?
VBScript Fundamentals
My Site
Revisions: 1
|
Post #: 1
RE: send email -
10/23/2005 5:34:00 AM
gmc8757
Posts: 2
Score: 0
Joined: 10/23/2005
Status:
offline
sorry, moved it
< Message edited by
gmc8757
--
10/23/2005 5:42:07 AM
>
(in reply to
kirrilian
)
Post #: 2
RE: send email -
1/6/2006 11:36:31 AM
TheMaster
Posts: 2
Score: 0
Joined: 1/6/2006
Status:
offline
I can't use it. It won't work.
(in reply to
kirrilian
)
Post #: 3
RE: send email -
1/8/2006 4:57:15 PM
kirrilian
Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status:
offline
i have edited and added comments, see if that helps...
_____________________________
Have you searched
here
?
VBScript Fundamentals
My Site
(in reply to
TheMaster
)
Post #: 4
If you found our site useful please link to us
<a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>
.
All Forums
>>
[Scripting]
>>
Post a VBScript
>> send email
Page:
[1]
Jump to:
Select a Forum
All Forums
----------------------
[Welcome]
- - Forum Rules
- - Test Posting Messages
- - New Member Area/Introduction
[Scripting]
- - WSH & Client Side VBScript
- - WSH & Client Side VBScript Tutorial
- - Post a VBScript
- - Windows PowerShell
- - ASP
- - ASP.NET
- - Windows Script Components
[General Forum]
- - Other Programming/Scripting Languages
- - Suggestions & Feedback
- - Off-Topic Lounge
New Messages
No New Messages
Hot Topic w/ New Messages
Hot Topic w/o New Messages
Locked w/ New Messages
Locked w/o New Messages
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
Forum Software ©
ASPPlayground.NET
Advanced Edition
2.5.5 ANSI