473,895 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create an email box in my domain

12 New Member
Hello,

Please how can I set up an email box in my domain. I have the php code and wish to create an email address as a recipient. The attached is the php codes I intend to use.

Thanks

Emeka
Attached Files
File Type: txt email.txt (884 Bytes, 418 views)
Dec 26 '09 #1
21 3801
Dormilich
8,658 Recognized Expert Moderator Expert
do you want to send or receive emails via your server? for the latter you explicitly require a mail server, while sending only requires a mail script.

PS. sending emails is more comfortable, if you use a mail library, like Swiftmailer.
Dec 26 '09 #2
Emeka
12 New Member
Thanks. My domain has the following features; MySQL sever under the admistration of phpMyAdim and java codes. The POP email server is ****. The previous attachment is the php codes I intend to use. Please I need some clues on how to create an exprimental email box in my domain to send and receive emails in my server. Can you please edit the source code.
Dec 26 '09 #3
Dormilich
8,658 Recognized Expert Moderator Expert
Can you please edit the source code.
no.

because I'd make that in a totally different way.

to get email from the server, I'd always use an email client (thunderbird, eudora, sylpheed, etc.), same goes for when I want to write an email myself. It needs special circumstances to use a web frontent for the mail server (form processing, blog comment notification ...).
Dec 26 '09 #4
Emeka
12 New Member
OK. Please is there any way you can help? I joined this IT group to gain practical advice from experts like you in php programs.
Dec 26 '09 #5
Dormilich
8,658 Recognized Expert Moderator Expert
Please is there any way you can help?
I hope so.

first thing you have to do is figure out, what you want to do exactly. (as I said, using mail clients can prevent many problems).

once you know what you have to do with a web form, you need to design the web interface (HTML/CSS/JavaScript). then you have to think, what the PHP code should do. you need a way to sanitize user input and so on.

rule of thumb: there is no need to reinvent the wheel.

I hope this helps at least a little

this is my current newsletter script (only top level shown). please note that this script (though looking rather simple) requires two additional classes and the aforementioned SwiftMailer library.
Expand|Select|Wrap|Line Numbers
  1. function sendMail()
  2. {
  3.     // since the user input comes from a restricted place,
  4.     // the usual input validation is omitted
  5.     $text    = $_POST["NLG"];
  6.     $betreff = $_POST["betreff"];
  7.  
  8.     // send mail only, if every required field was filled
  9.     if (!$text or !$betreff) 
  10.     {
  11.         echo '<p>Bitte alle Felder ausf&uuml;llen!</p>';
  12.         return false;
  13.     }
  14.  
  15.     // preparing auto text (mail footer)
  16.     $msg = "Liebe(r) {name},\n\n" . $text . "\n_______________\n\nZum Abmelden klicken Sie auf: http://www.example.org/abmeldung.php?uid={UID}\noder rufen Sie diese Adresse im Browser auf.";
  17.  
  18.     // send mails to every recipient from the DB
  19.     // thrown Exceptions are caught somewhere else
  20.     $RS = new BatchMail($msg, $betreff); 
  21.     $RS->setTo(getMailAdresses());
  22.     $RS->send();
  23.     saveMail($text);
  24.     // print mail success 
  25.     echo $RS;
  26. }
Dec 26 '09 #6
Emeka
12 New Member
Thanks alot. I am aware that html, css and javaScript will be involved. I just want to expriment on creating a form on web through which mails can be sent to my domain. Already I have created a mail box with the domain's name. One more question please, how can I link the code to my domain?
Dec 26 '09 #7
Dormilich
8,658 Recognized Expert Moderator Expert
how can I link the code to my domain?
which code?
Dec 26 '09 #8
Emeka
12 New Member
Ok thanks. I have little knowledge in php and wish to improve by practise and asking question. I mean is there any configuration between the php code and my domain? I have created an email box with my domain's name.
Dec 26 '09 #9
Dormilich
8,658 Recognized Expert Moderator Expert
well, that depends on what code you use. PHP's mail() function does not use SMTP, but if you wish to use SwiftMailer, check out it's excellent documentation (set the SMTP host in Swift_SmtpTrans port)
Dec 26 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3127
by: Keith Jakobs, MCP | last post by:
Greetings: I had seen several posts around the Internet about this issue from a few months back, but have been unable to find a resolution ... I have a user who is trying to get started with Visual Studio.NET 2003. We have uninstalled and reinstalled the Product.... then we did a complete cleanout of development products, re-installed IIS, and reinstalled JUST Visual Studio.NET 2003 with Framework 1.1 (no more 2002 edition or...
4
2739
by: Ron Vecchi | last post by:
I a runnning w2k3 pop3 mail server that came with iis6. I would like to write an application that progammtically creates the new mailboxes in an already established mail domain. Does anyone know how I would access this funcationality? Thanks, Ron Vecchi
4
6134
by: anders | last post by:
Hi! To create a new Windows account I use this code: const int UF_PASSWD_CANT_CHANGE = 0x0040; const int UF_DONT_EXPIRE_PASSWD = 0x10000; DirectoryEntry obDirEntry = new DirectoryEntry("WinNT://" + domain); DirectoryEntries entries = obDirEntry.Children; DirectoryEntry obUser = entries.Add(username, "User"); obUser.Properties.Add(name);
2
3635
by: vbnetdev | last post by:
This code does not work. I would appreciate any suggestions. I have to specify a domain name that is not even in its container otherwise it objects with errors abotu the method being invalid at GetMethodParameters. I have been able to create the zone and nameservers using similar methods without a problem. I am beginning to wonder if it is even possible. Dim classInstance20 As New ManagementObject( _ "root\MicrosoftDNS", _...
0
1731
by: comp.lang.php | last post by:
I wrote a method that should check if an email address is valid. In another method I've already checked to see if $_POST exists and is well-formed, so those checks are not necessary in this scope. However, "Step 4" bothers me, and I wonder if others are as bothered as I am. /** * Validate submitted email
8
2321
by: Brady Love | last post by:
I am very new to asp.net and I am currently working on an application that when users sign up it also creates a email account for them.I have done some reserch and found that this is possible to do using P3admin.dll but for the life of me I cannot figure out how. Has anyone successfully done this and/or have an example I could look at? (C#)
5
4884
by: Michael | last post by:
Hello, I've created an ASP web page where users in our organization can create Active Directory computer accounts. The web page is running on a Server 2003 SP1 IIS 6 installation. The Exchange System Manager is running on the web server and Exchange SP2 has been installed. The IIS site is configured with Basic Authentication and users are prompted to enter their Active Directory credentials when connecting to the site.
7
1701
by: tirrell payton | last post by:
Hello, I am attempting to validate my user's email addresses by sending them a link. However, I am having trouble concatenating the variable name (GUID) into the url. Im using C#: public void SendSignupEmail(string emailaddress, string customerid) { SmtpClient mysmtpclient = new SmtpClient(); MailMessage mymailmessage = new MailMessage();
2
2625
by: Hughesie11 | last post by:
Im trying to post from a form to send an email, im using CDONTS ( I have to as it will be running on NT4), the object appears to get created fine, however the email is not sending, its generates 3 files in the C:\Inetpub\mailroot\Badmail directory they are .BDR, .BDP & .BAD files, here is the text of the .bad: From: postmaster@SERVERMNAME To: myemail@domain.com Date: Fri, 14 Dec 2007 13:55:07 +0000 MIME-Version: 1.0 Content-Type:...
4
2764
by: mark4asp | last post by:
I want to write a xslt template to create a xhtml 1.0 (transitional) file which will be sent in as email. Here is a typical xml data file: <BatchEmail> <Domain>www.myDomain.com</Domain> <Destination> <Salutation>Hi Mark</Salutation> <UniqueID>4120</UniqueID>
0
9990
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9835
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10935
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10473
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9649
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7177
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5863
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4689
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3294
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.