«Home

How Do I Send Mail To My Local Server Dbase?

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?

Avatar
Newbie
9 answers

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.

0
Avatar
Newbie

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

- nitation

0
Avatar
Newbie

need a friend calle on 08053672256

0
Avatar
Newbie

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.

0
Avatar
Newbie

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.

0
Avatar
Newbie

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?

0
Avatar
Newbie

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.

0
Avatar
Newbie

do you want to send mail to email address and to database or what's the prob?

0
Avatar
Newbie

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

0
Avatar
Newbie
Your answer
Add image

By posting your answer, you agree to the privacy policy and terms of service.