E-Mails Hacks
-
Hi does anybody have any idea on how to stop using the current wp_mail function and use this instead. I have no real idea to go around this?
Assuming wordpress is installed at the root directory and your website is called thesite.com
You go to https://www.thesite.com
You log in to wordpress,
You then go to https://www.thesite.com/mail
This is NOT a wordpress page, it sees that you are logged in and then shows e-mails which have been sent to you.== When function is called to send e-mail ==
So the wp_mail function needs to
From $to find Real Name in UserTable
From $from remove everything from and including @Make sure the following colums in the USerTable are set:
EMAIL_FROM, EMAIL_SUBJECT, EMAIL_MESSAGE, EMAIL_HEADERS, EMAIL_ATTACHMENT_LOCATION.
Make sure arrays are set in above colums, if not create new array for each.If array already exists:
get value of EMAIL_FROM assign to $from-array
get value of EMAIL_SUBJECT assign to $subject-array
etcThen
with the new message which needs to be added,
$from-array = $from-array adding $from
$subject-array = $subject-array adding $subject
etcThen
Post values back into database== On The /mail page ==
Find out the user ID of the wordpress user currently logged in.get value of EMAIL_FROM assign to $from-array
etcThen
echo H1 These are you e-mails
Then while there are more messages not yet printed
echo H2 Subject H3 FROM
echo p B – ATTACHMENT LOCATION DOWNLOAD LINK
echo p B – EMAIL HEADERS
echo p MESSAGEthen if non left
finish
- The topic ‘E-Mails Hacks’ is closed to new replies.