Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6837865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:31:40+00:00 2026-05-26T23:31:40+00:00

I am creating a class that will handle mails and I am using PHP.

  • 0

I am creating a class that will handle mails and I am using PHP. I know how to send mail using PHP’s native mail function. But i am trying to create an efficient mailing system within a class. I had come up with what all things i need to have in my class.

  • Method to verify email address(using regular expressions)
  • Method to filter email address(remove all unwanted characters and injected headers and other false data)
  • Method to send plain text email
  • Method to send html email
  • Property to assign to address
  • Property to assign from address
  • Property to assign subject
  • Property to assign body
  • Mass mailing method

So how to make it in efficient way. I need ideas on what all things to take care of and other things. To validate email address i had seen a regex pattern that is a big one which is the standard. But if i use that it will be consuming more processing. Correct ?

And I do not want the email address to be considered as spam.
What do you use for the above said things ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:31:41+00:00Added an answer on May 26, 2026 at 11:31 pm

    You might consider using swiftmailer, as it has mostly everthing you want and is used in many products and frameworks, so you can be sure it’s fairly stable. I use it for some time now, mostly within symfony1 and symfony2, and I think you’ll have a hard time creating something similar.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im creating a Factory class that will contruct and return an object. I normally
I'm creating a class that will store data in a file and I need
I'm creating a class that will be part of a DAG. The constructor will
I am currently creating a class to handle all my form data which will
When creating a class that has internal private methods, usually to reduce code duplication,
I am creating a class that determines which of number of registered WCF client
I'm creating a class that derives from List... public class MyList : List<MyListItem> {}
I'm in the process of creating a class that stores metadata about a particular
I'm creating a class named TetraQueue that inherits System.Collections.Generic.Queue class overriding the Dequeue method,
I'm creating a specialised proxy class that implements IList<T> and wraps an internal List<T>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.