-
Oct 2nd, 2011, 08:12 PM
#1
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:
Dim EmailConnection As New SendEmail.SendEmail.EmailConnection("emailserver.com", 25)
SendEmail.SendEmail.SendEmailMessage("From@something.com", _
New System.Net.Mail.MailAddress() {New System.Net.Mail.MailAddress("recipient1@something.com"), _
New System.Net.Mail.MailAddress("recipient2@something.com")}, _
"Subject", _
"Message Content <B>in HTML</b>", _
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
Last edited by i00; Oct 5th, 2011 at 09:42 PM.
-
Oct 3rd, 2011, 03:21 PM
#2
Banned
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 ?
-
Oct 3rd, 2011, 05:27 PM
#3
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
-
Oct 3rd, 2011, 09:14 PM
#4
Banned
Re: Easy SendEmail class - with attachment support!
what is the walkthrough to reference a .exe inthis case for example ?
-
Oct 3rd, 2011, 10:12 PM
#5
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
-
Oct 4th, 2011, 12:22 AM
#6
Re: Easy SendEmail class - with attachment support!
Originally Posted by Nightwalker83
@ 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
-
Oct 4th, 2011, 12:26 AM
#7
Re: Easy SendEmail class - with attachment support!
Originally Posted by moti barski
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
-
Oct 4th, 2011, 12:37 AM
#8
Re: Easy SendEmail class - with attachment support!
Originally Posted by i00
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
-
Oct 5th, 2011, 12:57 AM
#9
Re: Easy SendEmail class - with attachment support!
Originally Posted by Nightwalker83
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
-
Oct 5th, 2011, 06:05 AM
#10
Banned
Re: Easy SendEmail class - with attachment support!
Originally Posted by i00
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.
-
Oct 16th, 2011, 06:07 AM
#11
Re: Easy SendEmail class - with attachment support!
Originally Posted by i00
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.
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.
-
Jan 3rd, 2012, 06:48 PM
#12
PowerPoster
Re: Easy SendEmail class - with attachment support!
i00...just email me the zip file if you wouldn't mind...blakemc@techemail.com
Thanks,
-
Jan 24th, 2012, 07:52 PM
#13
Junior Member
Re: Easy SendEmail class - with attachment support!
You need to Update Your Download Link its Dead //
-
Jan 25th, 2012, 10:21 AM
#14
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|