Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
| Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 7th, 2004, 03:17 AM
Authorized User
 
Join Date: Mar 2004
Location: Ahmedabad, Gujarat, India.
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mistry_bhavin
Default Send Emails and Attachments.

I want my application (built in vb.net) which sends email and attachments. How to get so?


 
Old August 7th, 2004, 03:57 AM
Friend of Wrox
Points: 1,288, Level: 14
Points: 1,288, Level: 14 Points: 1,288, Level: 14 Points: 1,288, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2004
Location: Stockholm, Sweden
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Dear you can use CDONTS for this



    Dim MyBody2
    Dim MyCDONTSMail3

    Set MyCDONTSMail3 = CreateObject("CDONTS.NewMail")
    MyCDONTSMail3.From= "somebody@nowhere.com"
    MyCDONTSMail3.To= "nobody@nowhere.com"
    MyCDONTSMail3.Cc="nobody2@nowhere.com"
    MyCDONTSMail3.Subject="This is a Test"

    MyCDONTSMail3.AttachFile Server.MapPath("/somedirectory/bla.txt")
    ' or you could specify the path exactly if you knew it like below
    'MyCDONTSMail3.AttachFile ("C:\inetpub\wwwroot\somedirectory\bla.txt")

    MyBody2 = "Thank you for ordering that stuff" & vbCrLf
    MyBody2 = MyBody2 & "We appreciate your business" & vbCrLf
    MyBody2 = MyBody2 & "Your stuff will arrive within 7 business days"
    MyCDONTSMail3.Body= MyBody2
    MyCDONTSMail3.Send
    set MyCDONTSMail3=nothing





Numan
--------------------------------------------------
Love is the most precious thing of this world. So find and grab it!
 
Old August 11th, 2004, 10:05 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Did I miss something? Isn't this .NET? The above is VB6.0 code..


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee




Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to send emails maitias C# 2005 2 February 1st, 2006 01:09 PM
send emails to several users femig VBScript 4 April 15th, 2005 07:42 AM
Send two emails instead of one ss2003 Beginning PHP 3 January 28th, 2005 11:54 AM
Send Emails in ASP tdaustin Classic ASP Basics 4 August 12th, 2004 07:09 PM
Using Mapi to send emails in VBA - Help? Magic_Hat Excel VBA 1 May 4th, 2004 07:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.