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 8749097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:38:16+00:00 2026-06-13T12:38:16+00:00

I’m trying to implement swift mailer into my website so I can send password

  • 0

I’m trying to implement swift mailer into my website so I can send password recovery emails to registered users. I’m using dreamweaver. What I have done:

1) Downloaded Swift-4.2.2.tar
2) Extracted it
3) Uploaded to my host in /Domain/classes/lib
4) Included it in Recovery.php

Here’s my file structure

Main Folder
     |classes
          |Swift
     |Private
          |Recovery.php

And here’s the code for Recovery.php:

require_once '../classes/lib/swift_required.php';
// Create the Transport
$email_to = $_POST["email"];
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465)
  ->setUsername('Username')
  ->setPassword('Password')
  ;

// Create the Mailer using your created Transport
$mailer = Swift_Mailer::newInstance($transport);

// Create a message
$message = Swift_Message::newInstance()

  // Give the message a subject
  ->setSubject('Password Recovery')

  // Set the From address with an associative array
  ->setFrom(array('Username@domain.com' => 'Username'))

  // Set the To addresses with an associative array
  ->setTo($email_to)

  // Give it a body
  ->setBody('Below is your temporary password. Please make sure to login in immediately and change it to a password of your choice.\n'.$password);

// Send the message
$result = $mailer->send($message);

But this is not including the libraries because if i do Swift_SmtpTransport:: then dreamweaver should popup an intellisense thing that gives me options of methods or variables, meaning it can see the class and all of it’s member items. But since it doesn’t popup the options, i get the feeling it cannot see what swift class is. And when I tried to run it, the console network tab said it was pending for a while before it returned a 500 Internal Server Error. So it’s not including the libraries properly. Any idea what I’m doing wrong?

Edit:
Error reporting output:

Warning: require(/*/*/*/Main Folder/classes/lib/classes/Swift.php): failed to open stream: No such file or directory in /*/*/*/Main Folder/classes/lib/swift_required.php on line 22 
Fatal error: require(): Failed opening required '/*/*/*/Main Folder/classes/lib/classes/Swift.php' (include_path='.:/usr/local/lib/php') in /*/*/*/Main Folder/classes/lib/swift_required.php on line 22
  • 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-06-13T12:38:17+00:00Added an answer on June 13, 2026 at 12:38 pm

    Open swift_required.php file. There’s a require() on line 22. Adjust it’s path to match lib/classes/Swift.php

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:

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.