Results 1 to 14 of 14

Thread: Easy SendEmail class - with attachment support!

  1. #1

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Lightbulb Easy SendEmail class - with attachment support!

    Attached is a small project that can be referenced to make sending emails a little easier for new users...

    It supports:
    • sending with authentication
    • multiple recipients
    • multiple attachments
    • setting the priority of mail


    All you need to do is reference the SendEmail project in the projects you want to send email from and call:

    vb Code:
    1. Dim EmailConnection As New SendEmail.SendEmail.EmailConnection("emailserver.com", 25)
    2.  
    3. SendEmail.SendEmail.SendEmailMessage("From@something.com", _
    4.                                      New System.Net.Mail.MailAddress() {New System.Net.Mail.MailAddress("recipient1@something.com"), _
    5.                                                                         New System.Net.Mail.MailAddress("recipient2@something.com")}, _
    6.                                      "Subject", _
    7.                                     "Message Content <B>in HTML</b>", _
    8.                                      EmailConnection

    There is more details in the test form on how to send with attachments / authentication etc

    Hope this helps some people ...
    Also please provide feedback and say thanks if this helped you

    Download - Downloads
    *Downloads are now hosted on multiupload due to the attachment limit on VBForums

    Kris

  2. #2
    Banned
    Join Date
    Mar 2009
    Posts
    764

    Re: Easy SendEmail class - with attachment support!

    when you say reference do you mean an imports statment or to add the class in the zip ?

  3. #3

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: Easy SendEmail class - with attachment support!

    Well you could either add a reference to the SendEmail.exe (which is what i meant - as is done in the test project) or add the class to your projects.

    And yes you can add references to exe files - i do this alot because i like to build in demo projects into my referenced libraries, as can be seen if you set your startup project to sendemail and run.

    Kris

  4. #4
    Banned
    Join Date
    Mar 2009
    Posts
    764

    Re: Easy SendEmail class - with attachment support!

    what is the walkthrough to reference a .exe inthis case for example ?

  5. #5
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Easy SendEmail class - with attachment support!

    @ i00

    Please remove all the .exe files from the attachment and then upload the source code to the forums. It is against forum policy to upload/link to zip files that contain .exe files as they could contain harmful viruses, etc which could infect a user's computer.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  6. #6

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: Easy SendEmail class - with attachment support!

    Quote Originally Posted by Nightwalker83 View Post
    @ i00

    Please remove all the .exe files from the attachment and then upload the source code to the forums. It is against forum policy to upload/link to zip files that contain .exe files as they could contain harmful viruses, etc which could infect a user's computer.
    There is no attachment - also the only exe files will be the ones that gets built in the debug/release folder/s. It is open source and all source code is supplied.

    Kris
    Last edited by i00; Oct 4th, 2011 at 12:29 AM. Reason: To highlight the fact that this is completly open source

  7. #7

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: Easy SendEmail class - with attachment support!

    Quote Originally Posted by moti barski View Post
    what is the walkthrough to reference a .exe inthis case for example ?
    Well ... if you have a look at the demo solution you will see two projects, SendEmail and Test...

    Just add the "SendEmail" project to your solution (it is an exe project), then right click on your project and select "Add Reference...". Select the "Projects" tab and highlight SendEmail then select OK.

    Kris

  8. #8
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Easy SendEmail class - with attachment support!

    Quote Originally Posted by i00 View Post
    There is no attachment - also the only exe files will be the ones that gets built in the debug/release folder/s. It is open source and all source code is supplied.

    Kris
    No, I meant remove the .exes from the upload you linked to above then upload the file you link to above on the forums instead of using third-party host.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  9. #9

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: Easy SendEmail class - with attachment support!

    Quote Originally Posted by Nightwalker83 View Post
    No, I meant remove the .exes from the upload you linked to above then upload the file you link to above on the forums instead of using third-party host.
    I would happily attach them in vbforums if they gave me a decent amount of space ... you get 10 mb's of storage space total on vbforums ... this is not enough ... my spell check that i will be releasing in a few days has a dictionary that is 2MBs by itself (compressed) without the source code even!

    Kris

  10. #10
    Banned
    Join Date
    Mar 2009
    Posts
    764

    Re: Easy SendEmail class - with attachment support!

    Quote Originally Posted by i00 View Post
    I would happily attach them in vbforums if they gave me a decent amount of space ... you get 10 mb's of storage space total on vbforums ... this is not enough ... my spell check that i will be releasing in a few days has a dictionary that is 2MBs by itself (compressed) without the source code even!

    Kris
    in phpBB it is not very frugal to allocate too much disk space per user.
    about 20NIS to add 500mb to the forum
    you could however use third party service and provide the dl link for your fatter filess.

    personally speaking I can hardly wait for a simplified spell checker, please pm me when it is done just in case I miss the thread.

  11. #11
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: Easy SendEmail class - with attachment support!

    Quote Originally Posted by i00 View Post
    There is no attachment - also the only exe files will be the ones that gets built in the debug/release folder/s. It is open source and all source code is supplied.

    Kris
    from the sticky at the top.

    Quote Originally Posted by Hack
    Unfortunately, computer virus contamination has become an unpleasant and often destructive fact of life. Often people pass along a virus without even realizing they are doing so. In an attempt to keep the CodeBank forum sections a safe and protected place within which to post and exchange useful pieces of programming code, compiled files will no longer be permitted in attachments.

    If a piece of compiled code is found in an attachment, the attachment will be downloaded, the compiled file will be removed (regardless of what it is), the original attachment will be removed, and the zip file reattached to the forum thread, intact, minus the compiled file. The original thread will be edited with a note indicating the action taken, and a PM sent to the poster referencing the policy outlined here.

    Many people (myself included) will not download an attachment if it contains anything that is compiled, so by including something like that in your attachment, you could be doing yourself a disservice. Many people who could benefit from your work and achievements will not be doing so because they are afraid to open what you have posted.

    On behalf of all forum members, thank you for your cooperation in this matter. If you have any questions concerning this policy, please feel free to send me a PM.
    Well done for contributing though.
    Last edited by ident; Jan 26th, 2012 at 05:15 PM.

  12. #12
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: Easy SendEmail class - with attachment support!

    i00...just email me the zip file if you wouldn't mind...blakemc@techemail.com

    Thanks,
    Blake

  13. #13
    Junior Member
    Join Date
    Dec 2011
    Posts
    25

    Re: Easy SendEmail class - with attachment support!

    You need to Update Your Download Link its Dead //

  14. #14
    Member
    Join Date
    Jun 2010
    Posts
    43

    Re: Easy SendEmail class - with attachment support!

    Indeed, can you re-upload please ? Thanks !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width