After 32 years in the House of Representatives, here is my advice on how people opposed to President Donald Trump’s assault on our basic values — a majority of those who voted last November — can best influence members of Congress. Done the right way, communications from citizens can have a significant impact on legislators, even when they claim to be immune to “pressure.” (“Pressure,” in legislative jargon, is the expression of views with which legislators disagree, as opposed to “public opinion” — the term used for sentiments that reinforce their own.)

The key to doing it right is being clear about the goal, which is to persuade the Senator or Representative receiving the communication that how he or she votes on the issue in question will affect how the sender will vote the next time the legislator is on the ballot.

This means the following:

Make sure you’re registered to vote — lawmakers check.

Many office holders will check this, especially for people who write to them frequently. Elected officials pay as much attention to those who are not registered to vote as butchers do to the food preferences of vegetarians.

Lawmakers don’t care about people outside of their district.

You can only have an impact on legislators for or against whom you will have a chance to vote the next time they run. In almost all cases, this means only people in whose state or district you live. Senators or representatives whose names will not be on the ballot you cast are immune to your pressure. There is a small set of exceptions — representatives who want to run for a statewide office in the next election will be sensitives of voters throughout their states.

Your signature — physical or electronic — on a mass petition will mean little.

You are trying to persuade the recipient of your communication that you care enough about an issue for it to motivate your voting behavior. Simply agreeing to put your name on a list does not convey this. I have had several experiences of writing back to the signer of a petition to give my view on an issue only to be answered by someone who wondered why I thought he or she cared.

The communication must be individual. It can be an email, physical letter, a phone call or an office visit. It need not be elaborate or eloquent — it is an opinion to be counted, not an essay. But it will not have an impact unless it shows some individual initiative.

Know where your representative stands.

If you have contact with an organization that is working on this issue, try to learn if the recipient of your opinion has taken a position on it. When I received letters from people urging me to vote for a bill of which I was the prominent main sponsor, I was skeptical that the writer would be watching how I voted.

Communicate — even if you and your representative disagree.

On the other hand, even where you are represented by people whom you know oppose you on an issue, communicate anyway. Legislators do not simply vote yes or no on every issue. If enough people in a legislator’s voting constituency express strong opposition to a measure to which that legislator is ideologically or politically committed, it might lead him or her to ask the relevant leadership not to bring the bill up. Conflict avoidance is a cherished goal of many elected officials.

Say “thank you.”

Even if your Representative and Senators are committed to your causes, you should write or call to thank them — not frequently, but enough for them to feel reinforced.

Enlist the help of friends in other districts.

Your direct communication with legislators outside your voting area will have no impact. But you do have friends, relatives, associates etc. Find out who the potentially influenceable legislators are on issues of prime importance to you, think about people you may know in their constituencies, and ask those who share your views to communicate with those who represent them. On an extremely important issue, get out the list to who you mail holidays cards or important invitations and ask them to communicate with their legislators.

To repeat the essence of point 5, if a legislator who you might have expected to vote differently — e.g. a Republican who votes no on a Trump priority — votes as you have urged, send a thank you.

Barney Frank, a Democrat, represented Massachusetts in the House of Representatives from 1981 to 2013 and was chairman of the House Financial Services Committee from 2007 to 2011.