Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Local Personal SMTP Server

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
US
Hi,

I'm looking for a small and local (on same machine) SMTP service or app that always runs outside of VFP on the same machine so that when I send an outgoing email from my VFP app, this service or app intercepts and contacts the actual smtp server for delivery. My app remains completely responsive at all times even when there are network, smtp or other external issues. I'm using it to send error emails with screenshots back to us.

Currently I send it to the smtp server directly from VFP and because now I'm including screenshots in the emails, the app is tied up for way too long, like 30-40 seconds for a 3.5mb screenshot file. I want the app to only prepare the email and hand it off to this ??? (that is outside my app) and continue doing what the app does with zero user delays...

I briefly look at the "VFP Parallel" processing articles a while back and wondering if that is overkill for this task?

I also looked at SmtpQ product from ChilKat which does exactly what I want, except it is only available in 64b...

Something simple is preferred?

Any ideas?
Stanley
 
Why not create a second VFP exe with your mail code and start it via RUN /N?

Bye, Olaf.
 
could you simply send the email to the remote server as you already do but launched (shellexecute) as a new process? Set _screen.visible = .f. in the new process and it will run in the background without the user being affected.

Perhaps create a text file with a memory dump and screenshot filename and pass as a command line parameter?

hth

n
 
Hi Olaf and hth,

Neither of these would preserve the emails if there was an issue. That is why I mention a local personal smtp server that is completely disassociated with the app once the app hands the email to it. Then if the network or mail server was down the email would not be lost and would automatically resend when the ?? issues are resolved.

When I asked this question I mentioned that I'm using it to send error messages and screenshots back to me from the customers site. The need to preserve the emails is in another app I've created where clients are charged money for the emails, hence the need to make sure they are delivered.

Any other ideas,
Stanley
 
For error reporting to myself I'm currently using gmail. (Shhh! Don't tell 'em!)

For mail to clients where clients pay for it, you should store the mail in a database and then send it so that you can re-send when the original send fails.

If you intend to set up your own SMTP server I would urge you to hire a qualified network technician to configure it properly so you don't become a SPAM relay and get your entire domain blacklisted around the world.

If you really want to go down that road, why not use Windows' own SMPT server?
 
Hi Dan,

I looked at this but the docs I looked at says its for sending SMTP mail from web pages and it was part of IIS which lead me to believe this is the wrong "Windows SMTP Server". Configuration of it is done via IIS Manager and on the default website. I actually tried it with Win8 and did not have any success.

Are you sure this is not web related and can function as a regular SMTP server?

The solution needs to run on XP and everything after.

Thanks,
Stanley
 
Obviously nothing from Windows 8 will run on XP. Full stop.

Frankly, Windows XP has well and fully reached end of life. Using it as a target platform is, um, a losing proposition.

The other strike working against you is you're trying to run a server component on Windows XP. Widows XP is not a server operating system. Full stop.

If you want to run server components you need to run them on a server OS.
 
Hi Dan,

>> Obviously nothing from Windows 8 will run on XP. Full stop.
My Win8 & 10 apps runs fine on XP... So what are you referring to here?


>> Windows XP has well and fully reached end of life
I agree, but I have installations that are XP with no plans to migrate, and have said to me repeatedly "We are not interested in the latest and greatest" and, they make up the lion's share of my business...


>> If you want to run server components you need to run them on a server OS.
Well, that is why I mentioned "personal" smtp server. One that resides on the workstation and does not rely on other failure points. Components that runs as full blown servers can still be an issue when networks and authentication is involved.

I'm trying to make it simple and immune to these points of failure by allowing the workstation where the email originates handle it all. This local personal smtp server which is separate from the vfp app is responsible for preserving the email and delivery when it can.

Thanks,
Stanley

 
If your goal is simply for improvement of your application, you could use a simple vfp ftp client and send your screen shots and else to your ftp server. And read back from the ftp site that files are indeed transmitted. And use a vfp ftp client to receive on your pc. ShellExecute this process as suggested in the previous posts.

 
> Neither of these would preserve the emails if there was an issue.

Well, I was stating you use your current code, just in a separate EXE you start as separate independent process.
So you're saying whatever you do now doesn't preserve the mails for later sending, too.

Eg you automate Outlook or any MAPI client and create mailitems to finally Send() them, the same thing happens in case you move this to another EXE. In case of internet or smtp server connection errors Outlook keeps mails in its outbox folder, until they're sent.

So, this works as simple as that. The seperate EXE could either be self contained and know what mails to send, eg processing the errorlog.dbf entries not yet marked as sent, or you prepare the mails in a DBF as a job table for that EXE and pass that in as parameter. Whatever, the mechanisms of outbox buffering apply to your current main EXE in the same way as a separate EXE. Why do you think you need to maintain an own SMTP server, when you didn't need one so far?

Bye, Olaf
 
Stanley,

You say that the root of the problem is that "the app is tied up for way too long, like 30-40 seconds for a 3.5mb screenshot file.".

I'm surprised that your screen shots are anything like as big as 3.5 MB. I find that a typical VFP application, running at 1280 x 720, saved as a JPEG, usually runs to about 200 KB. If I reduce the quality to say 70% or 60%, it is often considerably smaller, but still perfectly legible. I appreciate that 1280 x 720 might be a fairly low resolution these days (or is it? what do other VFP developers generally use?). Even so, 3.5 MB sounds very high to me.

I know this doesn't answer your question, but if you have an easy way of saving smaller screen shots, you might be able to avoid the problem completely.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I would try MailEnable.

There is a free version.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are not good for you.
 
Hi Mike,

>> You say that the root of the problem is that "the app is tied up for way too long, like 30-40 seconds for a 3.5mb screenshot file.".
Yes, exactly...

>> I'm surprised that your screen shots are anything like as big as 3.5 MB.
Yes and No... Yes if a 1920x1080 in 24bit color is saved as .png it is 3.5mb, and 860KB if saved as .jpg. Also if saved as a .bmp it is 8.1MB and 733KB if saved as .gif.

To help, I ported in Cesar's gpImage and changed sizing the percentage values, and with that I've gotten it down to 239KB as .jpg. which will probably work just fine so long as I put up an progress indicator. He and Alexander done an incredible job with that utility.

However, I still see this as a problem and really want to fix it in such a way that size will never be a problem, because I have instances where it could be common to send a 30-50MB file and I do not want to revisit this later. Like one and done... The recipients mail server limitations is another issue.

But, while we are on the subject, is there a way to query a mail server to see what its max size limit is?

Thanks,
Stanley

 
Hi Griff,

Thanks for the tip, will try it today...

Thanks,
Stanley
 
>the docs I looked at says its for sending SMTP mail from web pages and it was part of IIS

You are looking at the wrong documents.

Have a Google 'Microsoft CDO for Windows 2000' which has been a part of the OS since XP SP1
 
Hi strongm,

I did the google search and explored several of those documents and found nowhere explaining how to open, execute, or configure the local machine. I did see some scripts about sendmail that uses a link back to microsoft to set the smtp server. ie. Flds.Item(" ="[Mail Server Name]"

I also reviewed "Control Panel" > "Programs and Features" > "Turn Features On or Off" and nowhere in the "Feature Listing" do I see anything about SMTP... The only place I see SMTP is by selecting a site inside IIS.

So, any idea on how to run the local smtp app on all playforms since XP?
Thanks,
Stanley
 
Don't it is rubbish. There is a virtual server, but you need to install IIS 6 management to maintain it.
M$ has relegated it.



Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are not good for you.
 
A few things:

1. Cesar's gpImage was the core of VFPX gdiplusX, I also used gpImage, before it became that to dynamically compose images. Today I'd always use the more versatile gdiplusX.
2. How did you measure the tie up of your application?
3. How do you send mails so far, directly to some SMTP server, or do you automate Outlook or another mail client via MAPI?
4. If I try to attach a 160MB attachment to a mail item, Outlook errors with size too large, even before sending. So such limitations are not only about mail servers.

If you automate any mail client each Send comes back quite quickly, even with a 20MB attachment. If the app then is tied up, then not because your current process is tied up, but because the mail client process sending mail hogs the network bandwidth. A new component or local SMTP server could only relay the load to later, which you also could do yourself.

And how about using FTP?

Bye, Olaf.


 
Hi Griff,

>> Don't it is rubbish.
What are you answering, your original post, strongm's reply, or my reply to strongm or you?

>> There is a virtual server,
Where?

Thanks,
Stanley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top