 |
|
 |
very useful problem everybody faces - abstracts all the unnecessary details by querying the configuration
|
|
|
|
 |
|
 |
Hello all,
I have been using this class for many years. A few weeks ago, I installed my program on another machine at our club, and upon trying to send out our newsletter, it comes back with error 300.
I haven't seen it ever before, any idea?
Cheers
Alex
|
|
|
|
 |
|
 |
Hi,
CSMTPConnection::SendMessage() works fine provided the recipients in the "To" list belongs to the same domain.
I have a scenario where i need to send mails to different recipients in the list, how we can achieve this behavior?
To: abc.hotmail.com; xyz.gmail.com
One possibility is to send mails to all the recipients individually, but non of the recipients will get the entire list.
Is there anyway to solve the problem?
Thanks in Advance
Lakshman Kumar
|
|
|
|
 |
|
 |
I believe that limitation is by design and there is no straightforward way to work around that.
One possibility, if you have control over "destination" mail server is to use an email distribution group list, maintained by mail server (e.g. dlist@mailserver.com). Using the code, send to dlist email. The target mail server will then process the message, forwarding it along to the dlist recipients. That's probably hard to do if you can't create a dlist on some mail server.
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson
|
|
|
|
 |
|
 |
daluu wrote: I believe that limitation is by design
For this class, yes, that's correct.
|
|
|
|
 |
|
 |
When I run the code in visual studio 2005 I get "Debug Assertion" failed when I try to execute the statements
msg.SetSenderName(" ");
and
msg.SetSubject(" ");
(other statements, like msg.Addrecipient or msg.SetSender work fine)
If I retry and continue, I am able to send e-mail.
If I retry and break, I am getting the following:
inline BOOL AtlMimeConvertStringW(
__in IMultiLanguage *pMultiLanguage,
__in UINT uiCodePage,
__in LPCWSTR wszIn,
__out_ecount_part_z(*pnLen, *pnLen) LPSTR *ppszOut,
__inout UINT *pnLen) throw()
{
----> ATLENSURE( pMultiLanguage != NULL );
ATLENSURE( wszIn != NULL );
ATLENSURE( ppszOut != NULL );
ATLENSURE( pnLen != NULL );
*ppszOut = NULL;
*pnLen = 0;
Are there any settings in visual studio that I need to check/change?
Thank you
eugene
|
|
|
|
 |
|
 |
I AM GETTING THE SAME BUT -
YOU WROTE -
If I retry and continue, I am able to send e-mail.
ARE YOU REALY SENDING THE MAIL????
FOR ME -
I AM GETTING TRUE RETURN FOR
bb=conn.Connect((LPCTSTR)_bstr_t(aa), 1000);
I AM GETTING FALSE RETURN FOR -
ret=conn.SendMessage(msg);
SO, NO MAIL HAS BEEN SENT...
SO, WHAT ABOUT IMultiLanguage *pMultiLanguage ????
when you used
SetSenderName(LPCTSTR szName, UINT uiCodePage = 0)
you are giving by default uiCodePage = 0
i believe you have to change the value of uiCodePage
thank you.modified on Friday, March 5, 2010 5:58 PM
|
|
|
|
 |
|
 |
Hi,
it's simple
Download dll from.
httP://rapidshare.com/files/230326229/SendMail.dll
//Now prepare your message.
MailMessage mail = new MailMessage();
mail.To.Add("someone@somedomain.com");
mail.From = new MailAddress("tome@somedomain.com");
mail.Subject = "Send email without SMTP server";
mail.Body = "Yep, its workin!!!!";
//Send message
string domain = mail.To[0].Address.Substring(mail.To[0].Address.IndexOf('@') + 1);
//To Do :need to check for MX record existance before you send. Left intentionally for you.
string mxRecord = SendSMTP.DnsLookUp.GetMXRecords(domain)[0];
SmtpClient client = new SmtpClient(mxRecord);
client.Send(mail);
Go to http://dvgoswami.googlepages.com for complete details.
Do not use Dll provided for commercial use.
it should be used for only testing purpose.
Done!
D V Bava
modified on Wednesday, May 13, 2009 7:24 AM
|
|
|
|
 |
|
|
 |
|
 |
Hi,
Its done!..
How you got http://dvgoswami.googlepages.com ?
Shown in google search? Its my son's pic I put there...
Cheers
Dipak
D V Bava
|
|
|
|
 |
|
 |
How does your .NET implementation compare with the following one on CodeProject?
Email Sender[^]
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson
|
|
|
|
 |
|
 |
fatal error C1083: Cannot open include file: 'atlsmtpconnection.h': No such file or directory
|
|
|
|
 |
|
 |
Looks like the CSmtpConnection class is part of the ATL Server Library. Just adding ATL support to a VC++ 2008 MFC project doesn't gain you access to this. I couldn't find the header anywhere in my VC++ install either.
I found an old alpha build of the ATL Server Library on CodePlex at the below link.
http://atlserver.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=3754[^]
Sort of odd that the ATL Server Library is documented in MSDN but not included in VC++ 2008 and that there's only a 2 year old version on CodePlex.
What am I missing?
|
|
|
|
 |
|
|
 |
|
 |
Well, that's nice to know that this might now work for developing under VC++ Express.
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson
|
|
|
|
 |
|
 |
useful article
modified on Thursday, February 26, 2009 7:47 PM
|
|
|
|
 |
|
 |
I've implemented a primitive command line version of Nish's code at Some easy ways to send emails (via SMTP) and SMS text messages[^], but it sure would be nice if there was a COM/ActiveX implementation as well.
I'm not familiar with ATL/MFC COM/ActiveX development, so hoping there's someone out there who would be altruistic enough to do this. But I guess that's wishful thinking on my part...
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson
|
|
|
|
 |
|
|
 |
|
 |
Hello
Although your code is correct in theory, in practice it is useless.
When opening the connection with the SMTP server the client (your PC) sends the SMTP command
HELO <Computername>
Nearly all SMTP servers check in their whitelist that the <computername> is a valid SMTP server.
So all the big email providers will not allow you to send an email because they dont know the name of your PC.
So you get an error and the mail cannot be sent.
To see the data transfer with the server install a network spy tool like Packetyzer!
For example GMX.NET responds:
Sorry, your HELO has been denied... 550 (http:
If you open this page you will read:
E-Mails must comply to the standards described in RFC 2822. http:
E-mails should not be delivered from within dialup IP ranges.
The default setting for each user is to not accept sucht e-mail in order to prevent the spreading of mail worms.
The delivering server must have a reverse DNS entry with a fully qualified domain name.
A complete and plausible HELO/EHLO as described in RFC 2821 must be sent.
http:
We check the sending server for SPF compliance if the user hasn't disabled this setting.
The addresses of forwarded e-mail therefor MUST be rewritten using SRS standards.
The communicating server must not be an open proxy and must be protected against unauthorized access.
In case of any error we ALWAYS provide a error message in the SMTP dialog which cleary indicates
the source of the problem. Please check you server logs if you experience problems.
In case of reoccuring errors it is useful to identify the very first instance when the error occured.
We check several well established RBLs. Should one of them match our SMTP answer will tell you which,
why and what to do.
If it would be so easy as with your code you could easily abuse it for spamming and writing worms.
But it is not that easy!
Your code is blocked by the spam filters.
No chance!
Elmü
|
|
|
|
 |
|
 |
"Cannot open include file: 'atlsmtpconnection.h': No such file or directory"
I am using VS2008 with .Net 3.5 installed.I searched my system and it does not have this file. What else should I install to obtain this file?
Thanks.
the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions.
..surviving in autumn..in love with spring..
|
|
|
|
 |
|
 |
Hey Nish,
Thanks a lot for providing us with this code. It works like a dream for me so far. Keep up the good work.
Thanks,
Brijraj
Brijraj
|
|
|
|
 |
|
 |
Great job.
I renamed this method to use previous method in CSMTPConnection and your new method, and correct the memset bug in CSMTPConnection.
Thanks,
---
Herbert Yu
Are you sure the speed of computer industry is proper? Are you sure the software you released is a bug free one?
|
|
|
|
 |
|
 |
Hi Herbert,
<blockquote class="FQ"><div class="FQA">Herbert Yu wrote:</div>I renamed this method to use previous method in CSMTPConnection and your new method, and correct the memset bug in CSMTPConnection.</blockquote>
Are your corrections already present in the zip that we download (I hope not since the date of download is quite old).
For my reference could you please post the necessary corrections here. I particularly getting concerned since the zip I downloaded from this article does contain only two files and I was not able to find "memset" anywhere.
Please let me as I am trying to use it in my project.
Thanks,
Yogesh Dhakad
|
|
|
|
 |
|
 |
I'm presently testing the program I made with different domain names and apparently this is not working with some of them and I don't know why (ex: free.fr, hotmail.com, msn.com)
The connection with the SMTP server is established, but it doesn't send the email. Is there a way to get en error message from the sendMessage function of CSMTPConnection? Could it be because the server requires an authentification (it should not actually)?
Did someone notice the same thing?
Thanx
-- modified at 6:09 Monday 19th November, 2007
|
|
|
|
 |
|
 |
I don't have msn.com account
Works for me on hotmail.com
You have to specify an correct hotmail.com from email address and to email address.
---
Herbert Yu
Are you sure the speed of computer industry is proper? Are you sure the software you released is a bug free one?
|
|
|
|
 |