• DanixDefcon5 (unregistered) in reply to nsimeonov
    nsimeonov:

    Anonymous:
    HELO,
    I used to telnet to port 25 and talk directly to the SMTP daemon to send out spoof mails for fun.  Surely its not that hard to code up if you wanted to reinvent the wheel.

    -Andrew

    EHLO Anonymous,

    Talking to your SMTP server??? Nahhh... no challenge at all... what about writing your own SMTP server - querying DNSes and talking to recipients' SMTP servers is much more fun... NOW we're talking...



    Hm... Actually I did my own mini-program to send e-mails in C. It would read the e-mail body, rcpt, mail origin, subject et al, and "talk" SMTP by doing plain old socket connection. As the other fellow, I too sent e-mails from telnetting to port 25 back in the old days just for fun.

    Oh, how did I learn SMTP commands is something of a kicker ... thanks to the first versions of Eudora. It actually displays the actual commands it is sending when checking or sending email. (Incidentally, this opened the door also for the first generation of e-mail spoofers).

    Oh, and muuuuch easier to do it yourself with this method than ... hm... Clickyes??? ow!!! It iis true about idiots getting better at it.
  • mcguire (unregistered)

    Er, whas Maxim's predecessor Wile E. Coyote, by any chance?

  • safasfawfafafwa (unregistered) in reply to Gene Wirchenko
    Gene Wirchenko:
    Anonymous:
    nsimeonov:
    Unless it's a software firewall installed on each machine I don't see how you can determine the application if you have an "hardware" firewall device.
    Erm, you don't determine the application.  You set a firewall rule allowing an IP address, MAC address, computer name, whatever to send outbound traffic to port 25.

    Never seen a hardware firewall configuration before, eh?

    Apparently not, but he seems to have figured it correctly anyway.  How about dropping the "Never heard of..." and trying something less grating like "Yes, it works like...".  We have not all done what you have, and vice versa.

    Sincerely,

    Gene Wirchenko

    Oh please.  If we're not here to berate each other over each other's lack of knowledge about some stupid minutae about some esoteric subject, just what are were here for?
  • (cs) in reply to ammoQ
    ammoQ:
    Alex Papadimoulis:

    Someone with absolutely no .NET programming experience would take a few minutes on Google, and then reply "SmtpMail class in System.Web.Mail."



    Unlikely. This is the first hit for "programmatically send an email .NET":

    How to send e-mail programmatically by using System.Web.Mail in Visual C# 2005 or in Visual C# .NET

    so why should it take a few minutes?
    <font size="6">I</font>t takes me a few minutes to type in "programmatically."
  • (cs) in reply to safasfawfafafwa
    Anonymous:
    Oh please.  If we're not here to berate each other over each other's lack of knowledge about some stupid minutae about some esoteric subject, just what are were here for?


    Avoiding the stupidities ourselves.

    1) These WTFs are not due to esoteric minutiae.  They are usually due to major cluelessness.

    2) A lot of these stupidities happened because of a lack of proper communication.  Flaming is one way to have the lack.  Basic manners are surprisingly inexpensive and do have a positive payoff.

    Sincerely,

    Gene Wirchenko

  • (cs) in reply to safasfawfafafwa
    Anonymous:

    Erm, you don't determine the application.  You set a firewall rule allowing an IP address, MAC address, computer name, whatever to send outbound traffic to port 25.

    Never seen a hardware firewall configuration before, eh?

    And how on earth will you distinguish traffic from this IP address, MAC address, computer name and destination SMTP server generated by outlook or by some other application? Please explain me and I'll never ever say a word about networks and TCP/IP protocols...

    And about your question: yes I worked with a number of routers and I believe I know how they work. I admit I never dealt with the huge CISCOs that enterprise companies use.

  • (cs) in reply to Gene Wirchenko
    Gene Wirchenko:
    Anonymous:
    Oh please.  If we're not here to berate each other over each other's lack of knowledge about some stupid minutae about some esoteric subject, just what are were here for?


    Avoiding the stupidities ourselves.

    1) These WTFs are not due to esoteric minutiae.  They are usually due to major cluelessness.

    2) A lot of these stupidities happened because of a lack of proper communication.  Flaming is one way to have the lack.  Basic manners are surprisingly inexpensive and do have a positive payoff.

    Sincerely,

    Gene Wirchenko



    Hence the "Sincerely"?

    I do admit, basic manners are very easy to use and it does make everyday interactions enjoyable.  With bad manners, co-workers may shy away, deciding to "work out the solution" rather than asking for help from a rude co-worker, which would lead to many WTFs, ironically.

    However, completely shielding someone from realizing that they are severely lacking in a skill area is detrimental to them.  Sometimes a nice kick in the pants is warrented.

    Have a nice day!    :-P

  • (cs) in reply to nsimeonov
    nsimeonov:

    And how on earth will you distinguish traffic from this IP address, MAC address, computer name and destination SMTP server generated by outlook or by some other application? Please explain me and I'll never ever say a word about networks and TCP/IP protocols...

    And about your question: yes I worked with a number of routers and I believe I know how they work. I admit I never dealt with the huge CISCOs that enterprise companies use.



    In the scenario you are describing, you have Outlook <--> Exchange Server <--> Firewall <--> Internet.  What happens in this setup is that Outlook communicates directly with the Exchange Server using a different communication protocol (not SMTP, I think it is X.500. I haven't been in Systems for a while so my memory may be failing.).  The Exchange Server does the DNS lookup for the destination address, and if it is for a domain that it does not control it sends the email message out to the Internet via SMTP.  Since the firewall sees that the SMTP traffic is originating from the Exchange server, it allows the traffic through. 

    I find it very helpful for programmers to have an understanding of networks, email servers, active directory, etc.  It really does foster better communication between the developers and the systems guys who setup/maintain the servers and aides in debugging and often results in a better design. 

    Larrry
  • PS (unregistered) in reply to ammoQ
    ammoQ:
    Alex Papadimoulis:

    Someone with absolutely no .NET programming experience would take a few minutes on Google, and then reply "SmtpMail class in System.Web.Mail."



    Unlikely. This is the first hit for "programmatically send an email .NET":

    How to send e-mail programmatically by using System.Web.Mail in Visual C# 2005 or in Visual C# .NET

    so why should it take a few minutes?


    He propably found that but since he was using VB.NET that didn't help him...
  • James (unregistered) in reply to LionsPhil
    Anonymous:
    The web is just what some upstart at CERN did for a summer project.


    'Some upstart'. Right. Look at his prior history (hint - Al Gore didn't invent the WWW) and quite what this little upstart's invention has done for society (for better or for worse).
  • viper (unregistered) in reply to WHUH

    Anonymous:
    pjsson:
    Anonymous:
    I want to know how anyone makes money on a product that clicks yes. Do they offer a ClickNo? ClickMaybe? ClickBrillant?

    It cost $39.90, see http://www.contextmagic.com/express-clickyes I think an ClickNo application is an unfilled market niche which probably could sell for much for than $39.90, since it's often harder to say no to things than yes.


    The fact that CheckYes exists is the WTF here... and there are two versions of it!!  CheckYes Express and CheckYes Pro. 

    CheckYes essentially merely clicks 'Yes'

    CheckYes Pro mimics YES!!!!!

    ???

     

  • viper (unregistered) in reply to DanixDefcon5
    Anonymous:
    nsimeonov:

    Anonymous:
    HELO,
    I used to telnet to port 25 and talk directly to the SMTP daemon to send out spoof mails for fun.  Surely its not that hard to code up if you wanted to reinvent the wheel.

    -Andrew

    EHLO Anonymous,

    Talking to your SMTP server??? Nahhh... no challenge at all... what about writing your own SMTP server - querying DNSes and talking to recipients' SMTP servers is much more fun... NOW we're talking...



    Hm... Actually I did my own mini-program to send e-mails in C. It would read the e-mail body, rcpt, mail origin, subject et al, and "talk" SMTP by doing plain old socket connection. As the other fellow, I too sent e-mails from telnetting to port 25 back in the old days just for fun.

    Oh, how did I learn SMTP commands is something of a kicker ... thanks to the first versions of Eudora. It actually displays the actual commands it is sending when checking or sending email. (Incidentally, this opened the door also for the first generation of e-mail spoofers).

    Oh, and muuuuch easier to do it yourself with this method than ... hm... Clickyes??? ow!!! It iis true about idiots getting better at it.

    I did this in Cold Fusion (actually built right in) about 9 years ago, but have also seen it done in a trivial expect script

    captcha: chocobot

  • retsil (unregistered)

    Does System.Web.Mail just open a SMTP connection or does it implement a proper mail send queue? What if he wanted to keep a record of sent emails? What if he wanted to retry sending the emails if the SMTP server was temporarily unreachable. I recently configured /etc/init.d/sendmail locally to ensure that I had a proper mail queue rather than attempting to open a raw SMTP connection.

    In some ways a standard mail client might be the better option. That said, I cannot think of a worse way to go about interfacing to it.

  • (cs) in reply to retsil

    Anonymous:

    Does System.Web.Mail just open a SMTP connection or does it implement a proper mail send queue? What if he wanted to keep a record of sent emails? What if he wanted to retry sending the emails if the SMTP server was temporarily unreachable. I recently configured /etc/init.d/sendmail locally to ensure that I had a proper mail queue rather than attempting to open a raw SMTP connection.

    In some ways a standard mail client might be the better option. That said, I cannot think of a worse way to go about interfacing to it.

    SMTP server shouldn't be unavailable if so then you may install a local copy of the MS SMTP server and make it forward the mails through the real SMTP server (and accept connections only from 127.0.0.1).

    Keeping a copy of the sent mails is a real WTF on it's on as I said before - to keep some history of what was sent is much better to use a database rather than rely on other application. Also we're talking about a web application not a desktop, so please tell me how people will check what was sent - using remote desktop probably to log on to the serve?

     

    On your question what does this class do - yes it sends the mail through raw smtp connection. You will get an exception if you can't send the mail for some reason (the SMTP server is unreachable, it rejected the sender or recipient etc). However the proper queue is something your server shoud care about and if there's a problem connecting to the server you may notify your user accordingly. Keeping a log (and eventually retrying later) doesn't sound to me like a lot of work...

  • (cs) in reply to retsil

    Anonymous:

    rather than attempting to open a raw SMTP connection.

     

    Correction - I'm not sure what you understand under RAW smtp connection. System.Net.Mail doesn't allow you to communicate with the server sending commands like "EHLO" etc. You just set what the mail contents should be, specify SMTP server's address, port, etc. and it sends the email - that's all.

  • AT (unregistered) in reply to retsil
    Anonymous:

    Does System.Web.Mail just open a SMTP connection or does it implement a proper mail send queue? What if he wanted to keep a record of sent emails? What if he wanted to retry sending the emails if the SMTP server was temporarily unreachable. I recently configured /etc/init.d/sendmail locally to ensure that I had a proper mail queue rather than attempting to open a raw SMTP connection.

    In some ways a standard mail client might be the better option. That said, I cannot think of a worse way to go about interfacing to it.


    Few application-level mail sending libraries will implment any kind of queue/retry functionality (nor should they, IMHO).   The easiest, and usually best, approach is to run a local SMTP relay on each machine (sendmail, IIS SMTP service, whatever), only accepting connections from localhost, and send all mail from your application through that.

    It can then take care of all your relay/queue/retry/logging needs without having that functionality reinvented and reimplemented in each of your apps.



  • (cs)

    The real WTF is that Outlook is installed on a production server.

  • retsil (unregistered) in reply to nsimeonov

    Sorry, I just referred to raw as some kind of API which communicates directly with the STMP server as opposed to a daemon process which implements a mail queue.

    I guess the pros and cons of using SMTP vs. a local install of sendmail depends upon the problem at hand.

    My boss requested that I write a cron job to check that /etc/init.d/httpd is running and to send an email if it is not running. I insisted that running a such a cron job was a WTF and would not help. It would probably cause just as many problems as it would solve. After much protest, I finally conceeded that I would always send an email at boot time (rc.local). The email would include a check to see if httpd and mysqld started. Because reboot was probably after a UPS fail, there is no guaruntee that the corporate email server has restarted, thus a mail queue is required and a maillog to see reasons why the sending failed.


  • awefawefawfe (unregistered) in reply to Gene Wirchenko
    Gene Wirchenko:
    Anonymous:
    Oh please.  If we're not here to berate each other over each other's lack of knowledge about some stupid minutae about some esoteric subject, just what are were here for?


    Avoiding the stupidities ourselves.

    1) These WTFs are not due to esoteric minutiae.  They are usually due to major cluelessness.

    2) A lot of these stupidities happened because of a lack of proper communication.  Flaming is one way to have the lack.  Basic manners are surprisingly inexpensive and do have a positive payoff.

    Sincerely,

    Gene Wirchenko

    Dude, I'm being sarcastic.  In both posts.
     
    Sincerely,

    Gene Wirchenko's clone
  • awefawefawfe (unregistered) in reply to nsimeonov
    nsimeonov:
    Anonymous:

    Erm, you don't determine the application.  You set a firewall rule allowing an IP address, MAC address, computer name, whatever to send outbound traffic to port 25.

    Never seen a hardware firewall configuration before, eh?

    And how on earth will you distinguish traffic from this IP address, MAC address, computer name and destination SMTP server generated by outlook or by some other application? Please explain me and I'll never ever say a word about networks and TCP/IP protocols...

    And about your question: yes I worked with a number of routers and I believe I know how they work. I admit I never dealt with the huge CISCOs that enterprise companies use.

    You've honestly NEVER seen anyone ever use an enterpricey router?  Why are you even debating this point then?  My God, the crazy things you can do with those things...
  • GD (unregistered)

    I think some people just read the WTF and then post a comment, without bothering to read the previous comments, hence multiple posts of "ClickYes exists!!!111 WTF" and "System.NET.Mail, you out-of-date fool" etc.

    Some time back I made a tiny windows app which opens and talks to MSPAINT to compress folders-worth of JPGs. I still use this program.

    The real WTF is that people here say "first to post" when they really mean "first to comment"

  • BAReFOOt (unregistered)

    AAAAAAHHHH!!!!

    I'm BLIND, I'm BLIND!!!

    HELP, I CAN'T SEE!!! It was so.... GHASTLY!!!

    Can't.... believe.... GAARRRRGLLLL dies with foaming at the mouth

  • Devdas (unregistered) in reply to nsimeonov
    nsimeonov:
    Anonymous:

    Erm, you don't determine the application.  You set a firewall rule allowing an IP address, MAC address, computer name, whatever to send outbound traffic to port 25.

    Never seen a hardware firewall configuration before, eh?

    And how on earth will you distinguish traffic from this IP address, MAC address, computer name and destination SMTP server generated by outlook or by some other application? Please explain me and I'll never ever say a word about networks and TCP/IP protocols...

    And about your question: yes I worked with a number of routers and I believe I know how they work. I admit I never dealt with the huge CISCOs that enterprise companies use.



    You authorise a particular set of hosts to talk SMTP to the world on port 25. Then you guard that set of hosts from infection and stupidities like installing Outlook. Securing a small set of authorised hosts is easier than securing the larger set of user accessible workstations/desktops.

    You don't care which application is generating the traffic, only if that host is authorised to generate that kind of traffic.

    I work at a small ESP, and this is what we recommend to a lot of people who have NATs blocked by us at the IP level for sending viruses/spam.

  • Devdas (unregistered) in reply to JoeBloggs
    Anonymous:
    I'd say he was coming from a Unix background (each program does one task, does it well, and provides a simple interface for other programs to work with), except that 1) Outlook hardly "does it well", and 2) he never installed Sendmail on the server.


    If he was coming from a Unix background, he would just have installed Cygwin (or RTFMed).
    Unix (and non Windows) admins in general tend to know what they are doing. The popularity of Linux and MCSEs is making this less so.
  • [ICR] (unregistered) in reply to BAReFOOt

        Actually, the class must have been somewhat cryptic and undocumented, because I distinctly remember Googling (and I am a competent Googler) and ending up trying to impliment it myself, giving up, finding three other implimentations and trying to get them to work. Hence how I found out in my origional post it was depreciated, because I was thinking "Wa? That wasn't there when I last looked".
    Maybe now I can rewrite my application :D

  • (cs)

    I'm betting that there are a lot of unpatched outlook apps out there to get around that stupid click yes problem in automation solutions.  IT wouldn't be needed except that outlook does all the work putting multi-part attachments back together so nicely but utterly fails to reliably give a return address back through the automation interfaces.  Makes it very handy for recieving email, but a bitch to send even the simplest meaninful "thank you, we got it" (esp. if you foolishly applied an outlook patch in the past, oh, 5 or 6 years...)

  • Asif Youcare (unregistered) in reply to nsimeonov

    How come then Exchange can send email through an SMTP server when the ports are blocked? Am I missing something?

    You can send mail using an Exchange server via SMTP on port 25, but you can also use other protocols such as IMAP and MAPI on other ports.  IMAP and MAPI communications will get through fine.  SMTP will, of course, be blocked.

    Most corporate firewalls will block outbound SMTP from all except a few hosts (e.g. Exchange servers), so even though your PC is blocked, you can relay (if allowed) by sending (relaying) your SMTP messages via the Exchange server.


  • (cs) in reply to awefawefawfe

    Anonymous:
    You've honestly NEVER seen anyone ever use an enterpricey router?  Why are you even debating this point then?  My God, the crazy things you can do with those things...

    Looks like you didn't read thoroughly my message, but anyway... My point was, that you cannot distinguish between different applications on a machine. You may permit or deny a machine to communicate through a port to some other machine, but you cannot set a rule to allow Outlook to use port 25 (smtp), but noone else (application). This can be done through a software firewall. Do we agree on that finally?

    Using MS Exchange Server is a different issue and googling for 2 minutes gets you to this article http://support.microsoft.com/?id=310206 in other words - there's no excuse to rely on outlook to send your mails and keep what you've sent in the sent items folder - I believe we agreed on that too - there are databases invented last century for this case.

    Agreed?

  • (cs) in reply to Asif Youcare

    Anonymous:
    How come then Exchange can send email through an SMTP server when the ports are blocked? Am I missing something?

    Exactly. This is what I was debating all the time. So there can be 2 setups:

    1. SMTP is blocked and you should communicate to the MS Exchange Server using a different protocol (and class, not System.Net.Mail)

    2. SMTP is enabled and you use System.Net.Mail to "talk" to your server.

    And in both cases you don't need Outlook to send the email unless you have a software firewall, but even then it shouldn't be an issue - the administrator should allow your application to go through the firewall - it's a well-known application, so thinking of workarounds instead of fixing the firewall settings is a WTF and I'm amazed how many people said that in some cases using Outlook is ok for some occasions. Unless the customer explicitly asked so, but this is applicable only to desktop applications - on a web server it's a big WTF (installing a desktop application, ensuring that there is always a user logged on so this application can run, installing third-party software to "click" popups and so on)

  • (cs) in reply to Xepol

    Xepol:
    I'm betting that there are a lot of unpatched outlook apps out there to get around that stupid click yes problem in automation solutions.  IT wouldn't be needed except that outlook does all the work putting multi-part attachments back together so nicely but utterly fails to reliably give a return address back through the automation interfaces.  Makes it very handy for recieving email, but a bitch to send even the simplest meaninful "thank you, we got it" (esp. if you foolishly applied an outlook patch in the past, oh, 5 or 6 years...)

     

    Oh my God... Why, oh, WHY did you ever consider using Outlook to send or receive email? And probably advise people not to apply the patches? A better source for email worms isn't available. Man you should be decapitated immediately as you're are a threat to all your customers and people you deal with and who think you understand something about computers and software. Receiving email through Outlook??? WHY? Using automation isn't easier than using the protocol itself. Google for 5 minutes and you will find pop3 components to send or recieve the email for most of the platforms (I'm not talking about finding such a code on Prolog, but I would be really surprised to see Prolog "talking" to outlook through automation). So please take try to explain me WHY would you ever use outlook from your application? And what if someone doesn't have outlook because he likes Eudora, Thunderbird or Outlook Express better? Should (s)he install MS Office just to get your program working?

  • (cs) in reply to nsimeonov
    nsimeonov:
    Oh my God... Why, oh, WHY did you ever consider using Outlook to send or receive email? And probably advise people not to apply the patches? A better source for email worms isn't available. Man you should be decapitated immediately as you're are a threat to all your customers and people you deal with and who think you understand something about computers and software. Receiving email through Outlook??? WHY? Using automation isn't easier than using the protocol itself. Google for 5 minutes and you will find pop3 components to send or recieve the email for most of the platforms (I'm not talking about finding such a code on Prolog, but I would be really surprised to see Prolog "talking" to outlook through automation). So please take try to explain me WHY would you ever use outlook from your application? And what if someone doesn't have outlook because he likes Eudora, Thunderbird or Outlook Express better? Should (s)he install MS Office just to get your program working?


    Oh, I don't know, maybe because the app is an internal corporate app and all users are running Outlook?  I think there's a few companies out there that still run MS Office, you know. 
  • Resp (unregistered) in reply to ammoQ
    ammoQ:
    Anonymous:
    ammoQ:
    Bus Raker:

    5th post i hope (my favorite number)


    Sorry pal, the first post somehow went astray, so your post is actually the 4th.


    actually he is fifth, he used to be sixth, considering the first post is the WTF itself

    True, but why do people keep posting "first post" when they are actually 2nd, since Alex is 1st all the time?
    Because most people start counting from 0
  • (cs) in reply to GD
    Anonymous:
    Some time back I made a tiny windows app which opens and talks to MSPAINT to compress folders-worth of JPGs. I still use this program.

    blinks

    Would using a simple image-manipulation library not be quicker to write, faster, and give you more control?

  • Kemp (unregistered) in reply to rsynnott

    rsynnott:
    Anonymous:
    Some time back I made a tiny windows app which opens and talks to MSPAINT to compress folders-worth of JPGs. I still use this program.
    *blinks* Would using a simple image-manipulation library not be quicker to write, faster, and give you more control?

    Not to mention that if the user is already using Paint then it could talk to the wrong one and either mess up their work or at least annoy them to hell.

  • John Smallberries (unregistered) in reply to Gene Wirchenko
    Gene Wirchenko:
    Anonymous:
    Oh please.  If we're not here to berate each other over each other's lack of knowledge about some stupid minutae about some esoteric subject, just what are were here for?


    Avoiding the stupidities ourselves.

    1) These WTFs are not due to esoteric minutiae.  They are usually due to major cluelessness.

    2) A lot of these stupidities happened because of a lack of proper communication.  Flaming is one way to have the lack.  Basic manners are surprisingly inexpensive and do have a positive payoff.

    Sincerely,

    Gene Wirchenko


    Gene,
    You seriously need to get over yourself.

    Sincerely,

    John "Not part of the Gene pool" Smallberries
  • (cs) in reply to WHUH
    Anonymous:
    pjsson:
    Anonymous:
    I want to know how anyone makes money on a product that clicks yes. Do they offer a ClickNo? ClickMaybe? ClickBrillant?

    It cost $39.90, see http://www.contextmagic.com/express-clickyes

    I think an ClickNo application is an unfilled market niche which probably could sell for much for than $39.90, since it's often harder to say no to things than yes.



    The fact that CheckYes exists is the WTF here... and there are two versions of it!!  CheckYes Express and CheckYes Pro. 

    And according to the webpage, neither works with Outlook Express (they kindly show you the non-WTF way of getting rid of the annoying prompts instead, which apparently doesn't exist on Outlook proper).

  • (cs) in reply to Jeff S

    Jeff S:

    Oh, I don't know, maybe because the app is an internal corporate app and all users are running Outlook?  I think there's a few companies out there that still run MS Office, you know. 

     

    So what are the advantages of using Outlook+ClickYes instead of System.Net.Mail?

  • (cs) in reply to nsimeonov
    nsimeonov:

    Jeff S:

    Oh, I don't know, maybe because the app is an internal corporate app and all users are running Outlook?  I think there's a few companies out there that still run MS Office, you know. 

     

    So what are the advantages of using Outlook+ClickYes instead of System.Net.Mail?

    You are missing the entire point.  Yes, if you have .net installed, and are writing the app in .net, and you need to send emails, it makes a lot of sense of use system.net.mail.   That is why this post is a WTF.

    Not all PC's have .net installed, and not all programmers can work with .net.  Some have to write apps in VBA, and sometimes you have to send emails through Outlook -- especially in code written before .net was released.  Makes sense, right?.  I know in the past there were situations where I had to (as my previous example a few posts back showed), and using VBA and Outlook was a great, easy way to do things.  Of course, it was also a great, easy way for viruses to spread, so MS added the security feature.  Which ClickYES helped legitimate code send out bulk emails with requiring the user to click YES over and over and over. 

    Oh, by the way, in case you forgot, here's what you wrote which I replied to:

    >>Oh my God... Why, oh, WHY did you ever consider using Outlook to send or receive email?

     

  • (cs) in reply to AT
    Anonymous:
    ... The easiest, and usually best, approach is to run a local SMTP relay on each machine (sendmail, IIS SMTP service, whatever), only accepting connections from localhost, and send all mail from your application through that.

    Two thoughts: first, how do you prevent viruses and worms from taking advantage of your relay?  And second, even if you managed to secure it properly, why would you run a relay on each machine instead of centralizing it onto  single (pool of) server(s) where the queues can be maintained (instead of some old email getting stuck in limbo for months without ever being noticed)?
  • Scav (unregistered) in reply to ammoQ
    ammoQ:
    Alex Papadimoulis:

    Someone with absolutely no .NET programming experience would take a few minutes on Google, and then reply "SmtpMail class in System.Web.Mail."



    Unlikely. This is the first hit for "programmatically send an email .NET":

    How to send e-mail programmatically by using System.Web.Mail in Visual C# 2005 or in Visual C# .NET

    so why should it take a few minutes?


    My only possible guesses at why this solution wasn't found by the original coder:
    1) He had never heard of google.
    2) His PHB had aggressive WTF web-blocking software installed (e.g. Websense) that made it almost impossible to view any site containing useful information.
    3) ... erm ... no , I'm out of ideas.

  • JimBloggs (unregistered) in reply to JoeBloggs
    I'd say he was coming from a Unix background (each program does one task, does it well, and provides a simple interface for other programs to work with), except that 1) Outlook hardly "does it well", and 2) he never installed Sendmail on the server.

    I doubt it very much. A UNIX person would be far too lazy to go to such extraordinary effort just to send an email. In the UNIX world, if it's not simple, you're obviously doing it the wrong way.

    And every high level programming language under UNIX that I know of has a standard mail/SMTP class.. Net::SMTP in perl, smtplib in Python, System.Web.Mail/System.Net.Mail in Mono.

  • (cs)
    Alex Papadimoulis:

    2004-12-03 11:18 -- Check-in a custom email class that wraps around the CDONTS library.

    2004-12-03 12:39 -- Deploy to the server and learn that, because it is Windows 2003, it does not have CDONTS installed. Go back to the drawing board

    Okay, so he had a working solution using CDO, but CDONTS isn't installed in Win2003... A quick google search turns up several pages informing you that CDO for NT Server has been replaced by CDOSYS which exists on Windows 2000 and Windows 2003... Further, even if you only read the first hit, or use the I feel lucky search, you'd find out how to install CDONTS on Win2003...

    Some people should seriously be taken out to the barn and have unspeakable things done to them...

  • Reinder (unregistered) in reply to cconroy

    On many systems, the source control system is the easiest way to get code from the development system to the test or deployment systems. There even is an argument for saying that it should be the only way.

    So, to test his code on a system that is similar, if not identical, to the deployment system, this guy may have had to check it in.

  • (cs)

    Apart from the fact you don't want Outlook te be installed on a server and there are better ways to send mail (SmtpMail class), there is a better way to get rid of annoying security messages in Outlook. For example while synchronising with your PDA or phone.

    http://www.mapilab.com/outlook/security/

    And it is free, and no I don't have anything to do with this company...

  • NullSession (unregistered)

    Damn, oh-my-f*****g-god! This truly beats it all. How the fuck can a developer think like this. HAHA! I would have wanted to see this guy build an smtp server :-)

  • curious (unregistered) in reply to random_garbage
    random_garbage:
    Alex Papadimoulis:

    2004-12-03 11:18 -- Check-in a custom email class that wraps around the CDONTS library.

    2004-12-03 12:39 -- Deploy to the server and learn that, because it is Windows 2003, it does not have CDONTS installed. Go back to the drawing board

    Okay, so he had a working solution using CDO, but CDONTS isn't installed in Win2003... A quick google search turns up several pages informing you that CDO for NT Server has been replaced by CDOSYS which exists on Windows 2000 and Windows 2003... Further, even if you only read the first hit, or use the I feel lucky search, you'd find out how to install CDONTS on Win2003...

    Some people should seriously be taken out to the barn and have unspeakable things done to them...

    Speak a few...

    (captcha = "captcha")

  • (cs) in reply to James
    Anonymous:
    Anonymous:
    The web is just what some upstart at CERN did for a summer project.


    'Some upstart'. Right. Look at his prior history (hint - Al Gore didn't invent the WWW) and quite what this little upstart's invention has done for society (for better or for worse).

    James, meet sarcasm. Sarcasm, this is james, I believe you guys never met.

    Anonymous:
    ammoQ:
    Anonymous:
    ammoQ:
    Bus Raker:

    5th post i hope (my favorite number)


    Sorry pal, the first post somehow went astray, so your post is actually the 4th.


    actually he is fifth, he used to be sixth, considering the first post is the WTF itself

    True, but why do people keep posting "first post" when they are actually 2nd, since Alex is 1st all the time?
    Because most people start counting from 0

    Yeah except no, even in computer science where you're the most likely to find that kind of behaviour some people also start counting at 1 (Fortran arrays are 1-indexed for example).

    Normal people count from 1 onwards, not from 0 onwards.

  • wyz (unregistered) in reply to GreenLight

    GreenLight:
    The real WTF is that Outlook is installed on a production server.

    Agreed, putting MS Office components on a production server is a major WTF. Suprised that was not mentioned more in the thread.

    hmmm... Wonder if MS Office Outlook was installed for this, or if it was already on the server? And if only Outlook or other Office applications were installed?

    Also, this approach should only work when a user is logged into the server. (Relatively sure of this, but not verifying!) So he had to log in and leave the account logged in for this to work unattended.

     

  • I am not a robot (unregistered)

    Haaaaaaaaaaaaaaaaaaah...
    This should be mortalized somehow, like a trophy or a statue or something...

    This teh best WTF I ever read on this site....

  • Andrey (unregistered) in reply to masklinn
    masklinn:

    Yeah except no, even in computer science where you're the most likely to find that kind of behaviour some people also start counting at 1 (Fortran arrays are 1-indexed for example).

    Normal people count from 1 onwards, not from 0 onwards.



    OSI layers are also numbered starting from 1.

Leave a comment on “The Trials and Tribulations of Programmatic Email”

Log In or post as a guest

Replying to comment #:

« Return to Article