How Do I Send Mail To My Local Server Dbase?

Welcome. Please Login, Register, Or Activate! 
type your username and password to login
Date: November 24, 2009, 03:08 PM
431907 members and 298878 Topics
Latest Member: plationash
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Webmasters (Moderators: OmniPotens, yawa-ti-de)  |  How Do I Send Mail To My Local Server Dbase?
Pages: (1) Go Down Send this topic Notify of replies
Author Topic: How Do I Send Mail To My Local Server Dbase?  (Read 172 views)
*dhtml
How Do I Send Mail To My Local Server Dbase?
« on: August 29, 2009, 04:35 PM »

I am working on a rather difficult project (as usual - lazy me), that i need to send mails out.
So, here i was thinking that if i can send the emails to say a local dbase, it will be easier and faster
for test purposes! but that does not appear to be as easy as it seems! Any ideas?
The best option i seem to have is to use exim, sendmail or whatever, smtp server. . . . . . . . . . .

Is there no way i can say:  mail(. . . . . .); and have it store maybe in a file or somewhere?
yawa-ti-de (f)
Re: How Do I Send Mail To My Local Server Dbase?
« #1 on: August 29, 2009, 06:17 PM »

speaking for myself, I don't understand your post.  Try and break it down for the slow ones like me to understand, e jo  Cool
carbony
Re: How Do I Send Mail To My Local Server Dbase?
« #2 on: August 29, 2009, 06:45 PM »

do you want to send mail to email address and to database or what's the prob?
*dhtml
Re: How Do I Send Mail To My Local Server Dbase?
« #3 on: August 29, 2009, 06:56 PM »

During web development on my local server. I may need to send mass emails or whatever. And i need to see if the contents addresses and all
are properly formatted and all that before putting it all online.
Now what i usually do is to configure this fake sendmail or smtp server to send it, then i can retrieve with outlook express, but that only works
if i am online,
so now my question is this, is there a way to intercept the mails being sent out by the php mail function to save it to a file or database during development. Ordinarily, if you do not configure anything, the mail function will fail if you try using it in offline mode.
Cactus (m)
Re: How Do I Send Mail To My Local Server Dbase?
« #4 on: August 30, 2009, 08:44 AM »

hm I dont see a problem here.

You know what your mail function is going to look like. So instead for now, why dont you replace the mail function with an insert function all formatted etc?
*dhtml
Re: How Do I Send Mail To My Local Server Dbase?
« #5 on: August 30, 2009, 11:02 AM »

Quote from: Cactus on August 30, 2009, 08:44 AM
hm I dont see a problem here.

You know what your mail function is going to look like. So instead for now, why dont you replace the mail function with an insert function all formatted etc?
That is exactly the problem, replacing the mail function. If for instance i am using joomla, i need to tweak that or if i am using any library.
I have to keep replacing and re-replacing.
Anyway, i have solved the problem. I studied how exim and fake sendmail works. They use the technique called piping, so i created a c++ application
and configured my local server sendmail path to it. So it receives the emails and stores them in a local text file.

This works universally for joomla and all. And i do not need to replace mail function. There was a script i created earlier that checks if you are on local server so that it stores in dbase or if you are online sends normally. But with external cms and all that, it is rather difficult to implement.
Cactus (m)
Re: How Do I Send Mail To My Local Server Dbase?
« #6 on: August 30, 2009, 11:06 AM »

ok that explains things now.

So i guess you want to create different classes (so to speak) that will be reusable.

Then that makes sense
*dhtml
Re: How Do I Send Mail To My Local Server Dbase?
« #7 on: August 30, 2009, 12:47 PM »

Exactly. I will find a way to synchronize the mail to a php script and let the users decide what they want to do next with it.

Let me summarize in details:

- A php script sends out mail using the regular mail function in any php script on your local server.
- The small software i just made grabs the email and saves it to a local file (for now)

I have to switch to more serious tasks so i wont start dodging phone calls tomorow. See you folks later.
fundad
Re: How Do I Send Mail To My Local Server Dbase?
« #8 on: September 15, 2009, 04:05 PM »

need a friend calle on 08053672256
nitation (m)
Re: How Do I Send Mail To My Local Server Dbase?
« #9 on: September 15, 2009, 07:13 PM »

Have you tried Mercury mail server? I think a copy is bundled with Xampp. I don't know about other web servers.

- nitation
*dhtml
Re: How Do I Send Mail To My Local Server Dbase?
« #10 on: September 15, 2009, 09:52 PM »

this solution i made has simplified things, because in the end, mails sent out by my php mail() function gets piped to another php script
which decides what you wish to do with the mail, in my own case, i chose to store it in dbase. In the end the program works like that piping
stuff in cpanel that newsletters and so on make use of except that this one works offline on development server.
 Nairaland Rss Needed  Cost Of Hosting And Up Keeping Of Personal Website  Adobe Debuts Creative Suite 3 Web Premium  Page 2
Pages: (1) Go Up Send Topic to Friend by E-mail Reply 


Sections: Autos/Cars (2) Jobs/Vacancies (2) (3) Career Talk Education General(2) Politics Romance Computers Phones Travel
Sports Fashion Health Religion Celebrities TV/Movies (2) Music/Radio (2) Books Webmasters Programming

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa. See also: Nairalist Classified Ads
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.