If a surety satisfies the principal obligation, or any part thereof, whether with or without legal proceedings, the principal is bound to reimburse what he has disbursed, including necessary costs and expenses; but the surety has no claim for reimbursement against other persons, though they may have been benefited by his act, except as prescribed by the next section.