Sending Authorised Mail Using Imap_mail Function - Mailing through imap_mail().

free web hosting
Free Web Hosting > Computers & Tech > How-To's and Tutorials > Programming > PHP

Sending Authorised Mail Using Imap_mail Function - Mailing through imap_mail().

spotok
hi,
if you have an IMAP account then you can send the mail using the imap_mail() function of php. it is similar to mail() function but is an authorative way.. because your email account will require authorisation while sending an email

here goes an example..


==================================


imap_mail
(PHP 3>= 3.0.14, PHP 4 , PHP 5)

imap_mail -- Send an email message
Description
bool imap_mail ( string to, string subject, string message [, string additional_headers [, string cc [, string bcc [, string rpath]]]] )


This function allows sending of emails with correct handling of Cc and Bcc receivers. Returns TRUE on success or FALSE on failure..

The parameters to, cc and bcc are all strings and are all parsed as rfc822 address lists.

The receivers specified in bcc will get the mail, but are excluded from the headers.

Use the rpath parameter to specify return path. This is useful when using PHP as a mail client for multiple users.

================================

 

 

 


Reply

miCRoSCoPiC^eaRthLinG
Can you elaborate on that a little bit ? i.e. posting a working example here would be a lot more helpful
Thanks smile.gif

Reply

Houdini
I am kind of really confused with this 'tutorial'. miCRoSCoPiC^eaRthLinG is correct in pointing out that it would at least help to provide a real example. This is not a tutorial but merely useless info that could be gotten by going to the PHP:Manual to see this;
QUOTE
imap_mail -- Send an email message
Description
bool imap_mail ( string to, string subject, string message [, string additional_headers [, string cc [, string bcc [, string rpath]]]] )
This function allows sending of emails with correct handling of Cc and Bcc receivers. Returns TRUE on success or FALSE on failure..
The parameters to, cc and bcc are all strings and are all parsed as rfc822 address lists.
The receivers specified in bcc will get the mail, but are excluded from the headers.
Use the rpath parameter to specify return path. This is useful when using PHP as a mail client for multiple users.
Here is the link to the above quotes from the manual Function imap_mail()Note that I removed the whitespace in the actual manual and summed up the (tutorial) in one fell swoop because I RTFM and refer to it often. This is not a tutorial at all, and I just had to get that off my mind. I do suppose that by now the author that provided this 'tutorial' no longer is a member and if so maybe they would show the new powers of imap_mail() vice mail()
This post or tutorial is almost verbatim from the PHP manual, if the user is not already gone or banned they should be for that alone. IMHO

 

 

 


Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. php imap_mail rpath - 154.93 hr back. (1)
  2. imap_mail php - 162.02 hr back. (1)
  3. handling mulitple cc and bcc in php with example - 194.39 hr back. (1)
  4. mail(): bad parameters to mail() function - 199.33 hr back. (1)
  5. imap_mail tutorial - 213.96 hr back. (2)
  6. imap_mail php - 225.19 hr back. (1)
  7. imap_mail() - 226.49 hr back. (1)
  8. string additional_headers - 233.80 hr back. (1)
  9. imap_mail( - 235.83 hr back. (1)
  10. php imap_mail vs mail - 254.79 hr back. (1)
  11. php imap_mail - 258.74 hr back. (1)
  12. php send email imap example - 265.64 hr back. (1)
  13. imap_mail php example - 283.40 hr back. (1)
  14. send mail using imap php - 283.60 hr back. (1)
Similar Topics

Keywords : sending, authorised, mail, imap, mail, function, mailing, imap, mail

  1. Calendar And The Date () Function
    Making Math Simple With Modular Arithmetic (0)
  2. Preventing Spam When Using Php's Mail Function
    (5)
    First of all, if this is not the correct place for this topic please an Admin move it accordingly.
    Recently i read at the PHPBuilder.com website this excelent article Preventing spam when using
    PHP's mail function that explains in a very easy way how to avoid spammers send their spam from
    your own server. Generally speaking, almost all websites includes some kind of contact form which
    is used to send emails with the php mail() function, this contact form can be used for a lot of
    purposes like for example to send comments or sugestions, to report problems on you....
  3. Sending Mail Using PHP's Mail() Function
    Send mail from any account 2 any account (2)
    hi, It is possible to send mail from any account to any account using the php's built in
    mail() function.. for which is very easy to write the coding... wt you are supposed to do is just
    pass the parameters like from, to, subject, message .. and attachments if any, and your email will
    be sent in no time.. as Astahost.com supports the php scripts you can use it if you already have
    an account here... ============================================== Example 1. Sending mail.
    mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3"); ?> ....

    1. Looking for sending, authorised, mail, imap, mail, function, mailing, imap, mail

Searching Video's for sending, authorised, mail, imap, mail, function, mailing, imap, mail
advertisement




Sending Authorised Mail Using Imap_mail Function - Mailing through imap_mail().



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE