Codingdummy mail server

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Peter (BOUGHTONP)  
 To:  ALL
34426.1 
I want a mail server to use during development that doesn't actually send emails but just saves them somewhere and lets me view them.

Any ideas?
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Peter (BOUGHTONP)     
34426.2 In reply to 34426.1 
">> emails.txt"?

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Drew (X3N0PH0N)     
34426.3 In reply to 34426.2 
I don't do C
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Peter (BOUGHTONP)     
34426.4 In reply to 34426.3 
I was thinking more of a bash script or sommat. But having thought about it, it wouldn't really work would it as I doubt emails are sent to sendmail as plaintext.

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Drew (X3N0PH0N)     
34426.5 In reply to 34426.4 
I'd prefer a Windows solution, so I can develop when I've just got my notebook on me.

Something that just lets me put localhost:25 into the mail config area of Railo, then does the magic for me. :)
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Peter (BOUGHTONP)     
34426.6 In reply to 34426.5 
Well you could set up sendmail and force it to send all emails to you rather than to whoever.

I doubt you're going to find a mail server that's been made to just store stuff locally rather than send. Especially for windows. Though again, sendmail may have that option, I dunno.

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Drew (X3N0PH0N)     
34426.7 In reply to 34426.6 
I'm halfway there... :)
http://www.aboutmyip.com/AboutMyXApp/DevNullSmtp.jsp

A Java SMTP server that redirects everything to /dev/null

That'll do for now, but would be nice to get something that lets me verify my HTML is coming out as intended.
0/0
 Reply   Quote More 

 From:  sinkywinky  
 To:  Peter (BOUGHTONP)     
34426.8 In reply to 34426.1 

Here's one. In ruby.
http://rubymatt.rubyforge.org/mailtrap/

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Peter (BOUGHTONP)     
34426.9 In reply to 34426.7 
Oooh, and that does have an option to save the messages as .eml files.

Perfect. :)
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  sinkywinky     
34426.10 In reply to 34426.8 
You needed to be two minutes sooner. :)

Thanks though, that looks like it would do what I want too.
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Peter (BOUGHTONP)     
34426.11 In reply to 34426.7 
Surely you could replicate that just by setting your mail server to /dev/null? Which was going to be my suggestion until you said you wanted to save the content.

Wouldn't it be easier to just (while testing) replace your mail-sending function with a saving-to-html-files function? Rather than sending mails over a net socket to a server which is essentially doing the same thing.

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Drew (X3N0PH0N)     
34426.12 In reply to 34426.11 
My mail server is currently on the other side of the Internet.
(And I think I've blocked it from external connections too.)


quote:
Wouldn't it be easier to just (while testing) replace your mail-sending function with a saving-to-html-files function?


No, because that would:

1) Be violating the golden rule of testing. (make the test environments as close to live as possible).

2) Require five times as many lines of code. Including setting up an application mode to check against.
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Peter (BOUGHTONP)     
34426.13 In reply to 34426.12 
1) Says who? Engineers probably. What have engineers made that's been of any use?

2) You're using the wrong language.

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Drew (X3N0PH0N)     
34426.14 In reply to 34426.13 
1. Engineers built toilets, which are very useful for the disposing of wee.

Imagine what would happen if your toilet was not correctly tested.
It may have had a bug in it that caused you to piss in your face! :@



2. It's the same in any non-shit language. Look:

code:
sendEmail(to,from,subject,...)


vs

code:
saveVariable(content,...)
if (mode = live)
   sendEmail(to,from,subject,content)
else
   writeFile(content)
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Peter (BOUGHTONP)     
34426.15 In reply to 34426.14 
Well yes, if you include the conditional. But writing that conditional is a whole lot less effort than installing a non-working mail server.

And I piss in my face for recreation.

0/0
 Reply   Quote More 

 From:  99% of gargoyles look like (MR_BASTARD)  
 To:  Drew (X3N0PH0N)     
34426.16 In reply to 34426.15 
And I piss in my face for recreation.

If you team up with a decent pornographer you could do it for profit too. Ask Throb.

"some things never change"
someone who looks a lot like me, This Signature
0/0
 Reply   Quote More 

 From:  Dave!!  
 To:  Peter (BOUGHTONP)     
34426.17 In reply to 34426.14 
Surely it took you longer to create this thread?
---

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Dave!!     
34426.18 In reply to 34426.17 
An investment worth the it for the savings I will have in future projects. :{)
0/0
 Reply   Quote More 

 From:  Ben (BENLUMLEY)  
 To:  Peter (BOUGHTONP)     
34426.19 In reply to 34426.1 
i would say you should use postfix, and configure it so that all email goes to a local mailbox. you can do this by making it think it is the server for the domains in question, and from there, there's any number of ways you can deal with delivery. a maildrop script might be most flexible - if can even be set to create the mailboxes for you if they don't exist (thats if you don't want all the emails just going to one mailbox!)

then your code is real, and you can view the emails for debuggery.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Ben (BENLUMLEY)     
34426.20 In reply to 34426.19 
Not bothered about multiple email addresses - with the Java thing I found it preserves the from/to so I can view it when I open the .eml file.

Does it have any other advantages?
(I'm not too motivated to start configurating things if they're not an improvement over what I've found already.)
0/0
 Reply   Quote More 

Reply to All  
 

1–20  21–28

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats